Forgot your password?
Security The Internet

Remote Backup of Windows Boxes w/o Samba? 100

Posted by Cliff
from the data-dumps-over-a-secure-tunnel dept.
reezle asks: "I'm looking for a good (free as in beer) method to have my Debian server back up some remote Windows machines. There is no Samba in the mix; this is supposed to be a strictly secure internet thing. I've been toying with OpenSSH on the windows computers as a good tunnel, thought of simple tools like ntbackup initiated from a script on the Linux box, but not all of the pieces have come together yet. I need to have the Linux box make the connection, back up data (full and incremental backups) and have that backup data get back to the Linux machine in an encrypted format (across the wild internet). Has anyone done something like this?"
This discussion has been archived. No new comments can be posted.

Remote Backup of Windows Boxes w/o Samba?

Comments Filter:
  • Idea, (Score:4, Interesting)

    by MoOsEb0y (2177) on Wednesday August 04, 2004 @08:27PM (#9884868)
    Install an SSH Server on the windows machine, use SHFS [] to mount the remote filesystem to a directory, then use rsync to copy it.
    • by cookd (72933)
      Don't do this. You lose all the benefits of rsync this way. In fact, it will use 2X the network.

      Source -1- rsync1 -2- rsync2 -3- Destination

      RSync works assuming that paths #1 and #3 are fast (local) and that #2 is slow (network). So it does extra reads over #1 and #3 to minimize #2.

      Your suggestion puts #2 and #3 local and #1 on the network.
    • Re:Idea, (Score:4, Interesting)

      by nocomment (239368) on Wednesday August 04, 2004 @10:25PM (#9885533) Homepage Journal
      I do this [] on my linux boxes and it works really well. A quick google talks about people doing this between *nix and windows.
    • Why not just... (Score:3, Informative)

      by Gudlyf (544445)
      Why not just install the ssh server and rsync (via Cygwin []), then:

      rsync -avz -e ssh winbox:/cygdrive/c/ /path/to/backup

      Or one thing I use, to keep incremental backups, is rdiff-backup [].

    • I wonder what the pros and cons are of using a version control system for backup, such as subversion.
  • Three letters: SCP. (Score:5, Interesting)

    by GregChant (305127) on Wednesday August 04, 2004 @08:27PM (#9884869)
    Your best bet, in a cheap and dirty solution, is to use SCP. Set up a cron job to securely copy the files you need. No muss, no fuss, no samba, and all encrypted.
    • by cookd (72933)
      If you are copying 400 GB, you'll use 400 GB of bandwidth (less with compression, perhaps 200GB) each time you back up, whether or not anything has actually changed. That's very bad.

      The advantage of stuff like rsync is that it only sends the deltas over the network. I have a daily backup of my 400 GB over the net. If nothing changes, it only uses 100k of bandwidth.
      • by Drakon (414580) *
        WinRAR can create archives of files that were modified after a certain timestamp
        • Yes but rsync only copies the differences between old and new. So if you changed onle line in a 10M file, it only copies that one line. Winrar would compress that whole file again.
          • Does rsync work that way? I assumed that it basically looked at blocks of a file, and if a block didn't match up, it transmitted that block. I didn't think it would only transmit JUST the changed line(s).
            • Well, yeah, it works on a block. I don't think the previous poster meant to have the comment taken literally. To sum it up, if you only change a small portion of a huge file, rsync and other similar algorithms are definitely going to save a lot of bandwidth over even the best compression schemes in all but the most contrived cases.
    • It looked good, but I looked at the manual, and didn't see an option for incremental. (I don't want to be copying all 200GB every night from the box that only modified a 2k text file)

      Am I missing the option, or should I be wrapping SCP in something else that figures that part out?
      • by Zocalo (252965)
        Nope, you didn't miss anything as SCP has no incremental option. You could work around that by using a data compression tool to create an archive of just the files that have been changed, then SCPing that and uncompressing over the data mirror on the remote server. That doesn't help much if part of your data set is a big database file of which only a couple of records have changed though.

        A far more efficient method would be to look at using RSYNC with SSH as a few others have pointed out. There's a pre

        • Nope, you didn't miss anything as SCP has no incremental option. You could work around that by using a data compression tool to create an archive of just the files that have been changed, then SCPing that and uncompressing over the data mirror on the remote server. That doesn't help much if part of your data set is a big database file of which only a couple of records have changed though.

          A far better option would be Unison [], which does 90% of what you're looking for, and can be made to work across an SSH tu
  • cron+scp (Score:2, Interesting)

    by Cranx (456394)
    Have cron create a .tgz backup regularly, and download it through scp on your Windows machine.
    • That requires a lot of empty disk space, and wastes a whole lotta network bandwidth. Remote nightly backups of a 100 GB drive this way is a surefire way to go bankrupt when you get the network bill...
      • Re:cron+scp (Score:1, Troll)

        by Cranx (456394)
        Great suggestion, I think people with large volumes can really benefit from that advice.

        I'm glad to see not EVERYONE makes useless posts to Slashdot just to hear themselves harrumph around acting like know-it-alls who run around rebuffing everyone who tries to help others with a little advice, but never offer any advice themselves.

        +1 Insightful to you, my friend.
  • Why not samba? (Score:1, Interesting)

    by Anonymous Coward
    Can't you set up a vpn between the two pc's with OpenVPN, and use samba over the VPN?

    • For that matter, just tunnel to port 139 via ssh. So port 9139 (for example) on the linux box gets forwarded over ssh to port 139 on the ms/win box, and then you start samba with port=9139...dirt simple, no?

      -- MarkusQ

      • Save for the fact he's looking to pull the backups from Linux not push them from Windows.

        The Rsync solution is definitely the best suggested for what he asked for.

        However personally, I would setup a fileserver for the machines and make everyone use that for stuff they want backed up. Centralized storage is always a cleaner solution.

        • Save for the fact he's looking to pull the backups from Linux not push them from Windows.

          So he does a

          sudo mount -t smbfs //mswinmachine/c /mnt/mswinmachine -o ...
          on the linux box and then runs whatever backup solution he likes on the linux box (against the mount point). You can't get much more "pull from linux" than that.

          -- MarkusQ

          • So he wants to be secure and you are suggesting that he turns file sharing on on the windows boxes. Yeah that will really work.

            • So he wants to be secure and you are suggesting that he turns file sharing on on the windows boxes. Yeah that will really work.

              I don't think you are understanding what I'm suggesting. It isn't all that complicated:

              1. Use ssh to set up a TCP/IP tunnel between the boxes.
              2. Route smb trafic over the tunnel
              3. Allow smb connections over the tunnel (not to the world, obviously).
              4. Use this to mount the mswin box on the linux box
              5. Backup to your hearts content

              Using rsync over an unecrypted channel would be just about

              • 1) Fine that will work
                2) How are you going to get the windows boxes to do this without openning up SMB to the world unencrypted. (Hint you pretty much can't without a firewall box extern to windows)
                3) See previous point. Windows doesn't support this.
                4) See previous points.
                5) See previous points.

                The rsync was to be done over a ssh tunnel. Read the other posts. Either way you don't know what you are talking about so I suggest you clam up.
                • How are you going to get the windows boxes to do this without openning up SMB to the world unencrypted. (Hint you pretty much can't without a firewall box extern to windows)

                  I don't see why not. I've done it under NT4, and I can't imagine (well, I can imagine, but I don't think it's true) that the newer mswin versions are less functional in this regard. A quick peek at google seems to support [] the idea that it's possible (I haven't used an msbox for several years, but from what I see on google it appear

                  • A quick peek at google seems to support the idea that it's possible.

                    Apparently you didn't read this. This is for setuping secure access to an smb server from Windows. Which by the way is the exact opposite of what you are suggesting. They tell you to turn off file and printer sharing in the article for a good reason.

                    And Like Windows packet filter is secure.

    • Probably my bias from too much microsoft networking causes me to look for any other solution than microsoft style networking. haha
  • Cygwin [] and rsync []. That should do it.

    • Re:Cygwin + rsync (Score:2, Interesting)

      by Filoseta (519421)
      To expand on this slightly, I have had good success with duplicity [].

      It supports gpg signing and encrypting of archives and provides direct support for scp/ssh as a transport while handling full and incremental backups very nicely (well, after I wrote a few wrapper scripts just to make my life easier).

      I have not used it on windows with cygwin, but I know people who are.
    • Re:Cygwin + rsync (Score:2, Informative)

      by cookd (72933)
      Cygwin is not secure for daemons -- if user A is running a Cygwin program, you should assume that any user on the system can execute code as user A. This is due to the global shared memory that Cygwin uses to keep track of things -- it is accessible to all users and is assumed to be safe.

      If you're going to use rsync, use Interix/SFU. That's what I currently use, though I might switch to Unison. Works great, though sometimes the permissions are a pain (the Posix permissions don't always translate nicely
      • I didn't know about cygwin's security issues. Thanks for the tip. Windows is so odd, how can a program have global shared memory on a multiuser system? Sounds like a broken security model.

        • When you create shared memory, you can put whatever permissions you want on it.

          You wouldn't say that Linux is broken because you can make a file world-writable, would you?
  • Backup (Score:4, Interesting)

    by m0rph3us0 (549631) on Wednesday August 04, 2004 @08:37PM (#9884940)
    Use the windows backup program to have windows make the backups then have Windows copy them to the debian box via scp.

    Or.... put Samba on the Debian box, use port forwarding and the loopback adapter to create a tunnel to the samba box and have the windows backup program write to the samba share which is only listens on

    setup on windows box:
    Loopback IP:
    Real IP: XX.XX.XX.XX
    SSH port forward from Local to remote

    Create an account for each machine on the debian box.

    Windows backs up to \\\MACHINENAME

    • NTBackup that comes with Windows can NOT backup all the Windows system drive, only part of it. Windows XP and 2000 (not Windows 98) have crippled file systems, apparently to implement copy protection.

      NTBackup presumes that you are a peon whose time is worth nothing, and you don't mind loading all of your programs again. Some people restore a backup over a working Windows XP installation, but this is said by Microsoft technical support people to be unstable.

      The ONLY way to back up a Windows XP and 2
      • You didn't understand the KB article the first time you read it, and you don't understand it now.

        The article *clearly* talks about cloning hard disks for distribution (i.e., building a corporate master image for distributing across an organization), and has nothing to do with backing up your hard disk and restoring it *on the same machine*.

        NTFS is *not* crippled, and I've restored backups several times.

        It's a pain in the butt, because you have to have a running version of NT to run ntbackup, but it works

        • Every time I try to talk about this issue, someone tells me I'm wrong! I even put a warning paragraph at the end of my (grandparent) comment, and still it happened.

          For example: A backup that must be restored to the same computer is not a backup! Suppose something fails on that motherboard and you don't have any other motherboards exactly like it?

          A backup backs you up! If there are situations in which you won't get all your work back, you don't have a backup. This is not an isolated situation. The co
          • In any case, it is NOT NTFS that is at issue here. If you install XP/2K on a FAT32 partition, you'll have the same problem.

            The issue, if you had actually understood the knowledgebase article, is that XP/2K has per-machine IDs, and that cloning the hard drive *clones the machine IDs*. When you put the cloned image on two new machines, domain servers get confused.

            If your machine doesn't need to talk to an NT domain controller, the problems won't arise.

            If you need to generate OS installation images (say,

            • The SID must be changed anyway. That is an entirely separate issue.

              I was told by a senior Microsoft technical support engineer last week, and I have been told before, that duplicate SIDs also confuse peer-to-peer networks.

              XCOPY32.EXE can copy ALL files on a FAT32 partition. I stand by what I said. ALL the information in Windows XP and Windows 2000 is in files.

              DriveImage, and all of PowerQuest, is now owned by Symantec, which, in my opinion, is legendary for bad technical support. Acronis is way
              • No, an OS Installation image is designed to (gasp) be installed on a variety of different hardware. You need one of those for bulk installs, and, as I've said before, MS has a different set of tools (outside of Sysprep) that does that sort of thing. More importantly, every single communication from Microsoft that you've cited assumes that you're doing bulk installs, and, given that context, what they're saying is true.

                You, on the other hand, have overgeneralized what they've told you into places that are
            • The problem is that the SID gets copied. However in a domain environment you are going to be renaming the machine and joining it to the domain. Which coincidently changes the SID for the machine, hench a complete lack of a problem. As anyone who has used Norton Ghost to clone machines in a corp environment can tell you. Personally I like TrueImage because it can backup a server while it is live, great for those times when you have a dying HDD and you don't dare shut the machine down =)
          • On many systems you cannot do a *.* or * (depending on your OS preference) for a full system backup due to open files (think databases) and expect consistency. Due to the binary windows registry, among other such creations, you cannot expect to be able to copy it from a live box. There are tools and APIs to do so - windows own backup app, etc.

  • by namtro (22488) on Wednesday August 04, 2004 @08:41PM (#9884960)

    I've had fairly good experiences with the Unison [] product. It works similarly to rsync [] but with a few enhanced features. And I quote...

    • Unison runs on both Windows (95, 98, NT, and 2k) and Unix (Solaris, Linux, etc.) systems. Moreover, Unison works across platforms, allowing you to synchronize a Windows laptop with a Unix server, for example.
    • Unlike a distributed filesystem, Unison is a user-level program: there is no need to hack (or own!) the kernel, or to have superuser privileges on either host.
    • Unlike simple mirroring or backup utilities, Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed.
    • Unison works between any pair of machines connected to the internet, communicating over either a direct socket link or tunneling over an rsh or an encrypted ssh connection. It is careful with network bandwidth, and runs well over slow links such as PPP connections. Transfers of small updates to large files are optimized using a compression protocol similar to rsync.
    • Unison has a clear and precise specification.
    • Unison is resilient to failure. It is careful to leave the replicas and its own private structures in a sensible state at all times, even in case of abnormal termination or communication failures.
    • Unison is free; full source code is available under the GNU Public License.

    Anyway, you might give it a look...

    • I use Unison to back up Windows and Linux servers and have been very happy with it. I also use Unison to keep our development file systems in sync.

      Highly recommended!!

    • by FrenZon (65408) *

      I've had fairly good experiences with the Unison product.

      I am a huge fan of Unison, and I use it to sync all files, bookmarks and settings between my windows laptops and desktops. But it is NOT a backup utility - if you have it set to run at set intervals, and one set of files becomes corrupted, deleted or otherwise changed, Unison will then do the same to all the other files. It does not have rollback.

      It's handy for total machine or disk failures, but not so handy if, say, a virus trashes your files an

      • You would clearly want to have LVM (or some other) snapshotting enabled on the destination Linux host's volume. If you did want to export the snapshots for user restoration, you could then share out the point in time (12hr, yesterday, DOW, M,..) as well.

        Rsync with cygwin would be another option, my experience with OpenSSH/scp on Windows has been poor when it's under pressure.

      • that's incorrect. you can have it keep multiple copies\revisions of your backups.
  • A few solutions (Score:4, Informative)

    by moosesocks (264553) on Wednesday August 04, 2004 @08:43PM (#9884971) Homepage
    As mentioned earlier here, there are numerous SSH/SCP implementations for Win32. Search around. They're somewhat hard to find, but there's quite a few (make sure you choose one in active development. There are quite a few abandoned projects with security holes and other bugs). Honestly, I don't remember what one I use on my windows machine :) As a word of advice, do not use a cygwin distribution. They're somewhat buggy and need to run inside cygwin. The 'native' servers which link against some cygwin libraries seem to be allright though.

    There's also another easier option. But, it will cost you. Use a "real" backup program such as Retrospect [] which will do compression and encryption (very strong encryption if you desire) client side. More often then not, this is what big businesses use. You can then safely use smb, ftp, scp, whatever you wish
    • Re:A few solutions (Score:2, Informative)

      by zatz (37585)
      Cygwin has it's shortcomings, but I use it for exactly this task and it works well. Some tips for new Cygwin users:

      You will need to run ssh-host-config after you install the ssh package. Under Windows Server 2003, it apparently can't setuid properly unless an actual password is supplied, so change the service to run as the user, instead of local system.

      Cygwin is sometimes a little slower than you might expect, especially for I/O, due to the extra layers of indirection. One huge performance problem is t
    • They're hard to find? Ever heard of google? :)

      There's a great port of OpenSSH I use regularly on my windows boxes - perfectly seamless operation with unix machines. very nice.

  • netcat (Score:4, Informative)

    by bergeron76 (176351) * on Wednesday August 04, 2004 @08:55PM (#9885040)
    Use netcat (nc) []

    A version exists for Windows (it's what the kiddee's use), but it can be used for legit purposes if done properly.

  • rsync (Score:3, Informative)

    by DDumitru (692803) <[doug] [at] []> on Wednesday August 04, 2004 @09:01PM (#9885080) Homepage
    You can push the data using rsync. Load the Windows / cygwin version of rsync/ssh on the windows box. Then sync the whole box up to a debian directory over ssh. If you get fancy you can build rotation sets, etc. rsync is very efficient at moving only what changes, handling include/exclude lists, etc. Great for backing up lots of data.

    Do a google search on "rsync windows backup".

    The only downside is that rync will "kill" your upstream internet connection (it is that efficient). Fortunately, there is a --bwlimit option so you can back off a little.

    If you are looking for a commercial hoster with all of the scripts pre-built we are happy to help (sorry for the AD), but it is pretty easy to roll this yourself.
  • Bacula (Score:4, Informative)

    by DeathBunny (24311) on Wednesday August 04, 2004 @10:23PM (#9885522) Homepage
    Use Bacula []. It's a GPL'd client/server enterprise backup software. It includes clients for most versions of Unix, OSX, and Windows.

    Although the clients do not have built in support for encryption, according to the manual you can run the clients through stunnel [] to encrypt the traffic between the clients and the backup server. Future versions are supposed to support encryption built into the client.

    • I'll second the vote on Bacula. Its good stuff. Very fast and efficient. I haven't done anything with Windows clients yet, though, so I can't vouch for how well that works.
    • Re:Bacula (Score:2, Interesting)

      by GLHMarmot (124846)
      I use bacula extensively between various flavours of linux and windows. It just works. You can set your retention period and it will automatically purge old information. It will write to various backup media (tape, disk etc) and create volume sizes of your choice.

      I use OpenVpn for encrypted connectivity between the machines as I am backing up a number of them across the net. It also has linux and windows clients.

      One caveat is that I don't use it to backup the entire system. I back up the users' data and c

  • cygwin, bleh (Score:3, Informative)

    by kayen_telva (676872) on Wednesday August 04, 2004 @10:25PM (#9885531)
    you dont need cygwin. putty on the windows machine can create a tunnel to your debian machine. do what you like from there
  • Legato's [] Networker Backup is a multi platform, Enterprise level backup solution. It will back up to tape and to disk archives. We use it on all of our production level systems. You should be able to grab a copy from here. []. I'm not sure if it's "free" or not since our Purchasing dept. deals with software acquisition but i've not had any problems downloading copies of it.

    If you don't care about enterprise features (and if it turns out you have to purchase it and don't want to), use cygwin/rsync like ev
    • Unfortunately, it doesn't look the least bit free (in any sense of the word...) Other than that, it's pretty wonderful stuff.
      • Wonderful? Awful. Legato is the sick man of the distributed systems backup world for some good reasons.

        The leaders are Veritas's NetBackup and IBM's TSM. Not that I'm endorsing either...however, having used all three, I'd pick either NBU or TSM over Legato every time.

        • The leaders are Veritas's NetBackup and IBM's TSM. Not that I'm endorsing either...however, having used all three, I'd pick either NBU or TSM over Legato every time.

          I agree that Legato is best avoided - in gereral, it leaves a trail of dead bodies behind it...

          As far as cpommercial b/u software goes, BakBone's NetVault is a far better (both in functionality and price) option than either Veritas (good but $$$) or TSM (a true power tool, also $$$, but also requiring *way* too much arcane knowledge about its
  • Look at rdiff-backup (Score:3, Interesting)

    by cornice (9801) on Thursday August 05, 2004 @12:22AM (#9886055)
    Take a look at rdiff-backup []. I've been very impressed with it. From the website:

    rdiff-backup backs up one directory to another, possibly over a network. The target directory ends up a copy of the source directory, but extra reverse diffs are stored in a special subdirectory of that target directory, so you can still recover files lost some time ago. The idea is to combine the best features of a mirror and an incremental backup. rdiff-backup also preserves subdirectories, hard links, dev files, permissions, uid/gid ownership, and modification times. Also, rdiff-backup can operate in a bandwidth efficient manner over a pipe, like rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up to a remote location, and only the differences will be transmitted. Finally, rdiff-backup is easy to use and settings have sensical defaults.

    I found it to be very fast and reliable. And yes, it aparently does work under Windows [].
  • tar cvjf - some_directory | ssh somehost cat - \> ~/backups/somearchive.tar.bz2

    Oh you said Windows... There's always Cygwin. :)
  • Bacula [] has a binary to work with windows. Of course, there WILL be some system files that you'll not be able to back up while the thing is running, but the majority of windows files should be backed up flawlessly.

    Don't know if it goes through the net encrypted, tough. The security I would use is the (not default, heh) hash pass"phrase", compression, and VPN.
    • I've been working with bacula since I've seen it here. It looks like a winner so far. I dropped it on a windows box, opened a port on the router, and have been able to send commands from the linux server across town to it. Thanks for mentioning the encryption part. Perhaps good compression and encryption can go hand-in-hand while it backs up. I haven't fired up a sql engine on that box to get fancy with the backup jobs, but this product looks great. Do a full backup once a week (or month), incremental
  • Arkeia! (Score:3, Insightful)

    by GoRK (10018) <johnl@[ ] ['blu' in gap]> on Thursday August 05, 2004 @02:05AM (#9886400) Homepage Journal
    Well since you said free as in beer not free as in libre, and since you did not say how many machines you needed to back up exactly, I might as well suggest to you that you try Arkeia. The free version, "Arkeia Light," supports a server with a single tape drive (no changer robots) and up to 2 client machines. So you can use it to back up 3 machines -- If you use more than that or if you have a tape library, you gotta cough up for a license.

    Plenty of the solutions people have posted about are fine and dandy hack jobs and while they probably will work -- they would take a lot of time and effort to implement. Arkeia is pretty easy to install on the client end - you basically just install the client and tell it the name of the server - the acutal backup is managed completely by the server. Clients are available for practically every OS under the sun.

    Arkeia has served me pretty well over the last few years, so even with the cost (not very much for a comparable solution from any other vendor) you really do get a pretty decent product.
    • Only problem with Arkeia is its userinterface. It looks like Picasso made it when he was high on crack...
      • Haha yeah it sucks. The current version is a little better than version 4, though you can change the color schemes to something a little more sane in both.

        If you really never want to see it you can delve into the hysteria of the arkc command line client with it's ten million options and modes.
  • by smoon (16873)
    We use rsync to mirror (back up) about 200GB worth of data from a remote office via partial T1 line. Would work well enough over ssh too I suppose.

    Our setup actually runs the rsync server on the windows machine. Main problem is that the default one with cygwin dies mysteriously for no apparent reason. Some googling found us a fixed version to use -- 18 months on, no issues.
  • by dimss (457848)
    We use cygwin rsync+ssh as for backup purposes and data exchange between remote offices. This is the best solution we've found so far. Each office runs rsync every minute. Data is transferred via Linux server.

    There are drawbacks too. For example, you cannot store SSH key on mapped network drive. And do not use it with Windows 98, bash script and rsync will hang after 1-2 hours.
  • dual boot to linux (Score:2, Interesting)

    by kyuso (775087)
    I dual-boot to linux in all the Windows PC (Every PC has linux boot) then use ssh/rsync to backup the whole Windows directory. Of course all windows partition must be FAT32 (even for WinXP) or something read/writable by linux. Then ssh reboot to Windows.

    Nothing fancy to do on Windows. It takes 10 to 30 minutes to restore Windows to the way it was exactly when it was backed up, including XP. Without linux, it would have taken a whole day with all the patches, drivers, exact configuration, applications insta
    • I don't mean to be rude, but what's the point of what you're doing? Why do you need linux? It's all eminently possible with windows, and without needing an extra partition and two operating sytems to do the job. I know there are lots of linux zealots who'd use it to scrath their ass if they could, but that's just silly.
  • BackupPC (Score:3, Insightful)

    by mrph (708925) on Thursday August 05, 2004 @05:23AM (#9887056) Journal
    I use BackupPC [] on a Debian box to backup some laptops and a server at work.
    It is highly configurable and easy to set up automatic backup routines and you can monitor operations
    using a webbased interface. BackupPC also supports various transfer methods such as rsync, samba, etc.
    and makes use of compression and pooling of files to save diskspace.

    Of course, getting some scripts using rsync over ssh or something like that won't be that hard,
    but anyway, I recommend you to check out BackupPC.

  • Dantz Retrospect [] lets you back up Linux boxes from a Windows or OS X backup server using its own client. They only support RedHat, but they do have a tar.gz that can probably be made to work with Debian. It's what I use to back up my firewall/email/web/everything server. It uses multicast for discovery, so if you put it onto a firewall, you'll need to set up multicast so that the packets are internal instead of on the default (Internet) route for the backup server to see the Linux box.
  • by Proteus (1926) on Thursday August 05, 2004 @10:15AM (#9888498) Homepage Journal
    I've got a quick-and-dirty solution that I use for off-site backups of a relative's Windows network. This may not be exactly what you need, but hopefully it gets you started in the right direction.

    First, I create backup files. To do this, I use the Backup utility built into Windows (for better or worse). Of course, this assumes you have enough freespace on your Windows volumes to accomodate the backups...

    On the server side, I set up an FTP daemon and an OpenSSH daemon. The FTP daemon is configured to only accept connections from localhost, so one must log in via SSH to transfer via FTP.

    Then, I use a simple Win script to
    1. open a key-authenticated SSH session with PuTTY (configured to tunnel FTP connections)
    2. establish an FTP connection with localhost on the Win machine (initiates tunnelled connection)
    3. transfer the files with FTP over the secure link

    This has worked fantastically well for me, and the only thing I didn't already have was PuTTY. It's also as secure as any other SSH activity (pretty darn secure), and if you make the SSH session log in as a restricted "backup" user, it becomes very difficult to use this system to escalate privileges on the server.
  • Yes, I've done this. (Score:3, Informative)

    by millisa (151093) on Thursday August 05, 2004 @10:19AM (#9888555)
    I've put something similar in place which utilized the built in NTBackup as well as a combination of SSH/FTP. Scripting out NTBackup is easy enough; you just create the BKS file it'll use, backup using that file, and then get the file over to your linux system.

    To backup the systemstate (you need to do this on your DC's and Exchange boxes), you have to do it locally.

    Instead of putting in a directory in your BKS, just put the word: SystemState
    on its own line.

    Your exchange directory store:

    You exchange information store:

    Directories and files:
    c:\anotherdir \blah

    To exclude:
    add a /exclude to the dir/file line in the BKS.

    Note: The BKS files are in a sort of unicode format (thanks Microsoft). I was using perl to create the files before every backup so I didn't have to depend on changing static files on each system being backed up. Its not quite unicode . . . open the file in a hex editor and check it out if you want to write them dynamically.

    To kick off ntbackup at the commandline and use that BKS, something like this would work:

    ntbackup backup "@\\server\backupdir\YOURSERVER_SystemState.bks" /j "Helpful Description SystemState" /f \\server\backupdir\name_of_your_backup.bkf /n "Helpful Description SystemState" /d "Helpful Description SystemState" /v:no /r:no /l:s /m normal /rs:no /hc:off

    Or for an incremental:
    ntbackup backup "@\\server\backupdir\YOURSERVER_bunchadirs.bks" /j "Helpful Description BunchaDirs" /f \\server\backupdir\name_of_your_backup.bkf /n "Helpful Description BunchaDirs" /d "Helpful Description BunchaDirs" /v:no /r:no /l:s /a /m incremental /rs:no /hc:off

    I was planning on exclusively using SCP to transfer the files between the systems, but I ran into problems with the Win32 SSH client and server. Anytime I wanted to move a file bigger than 2G off the Win systems, I'd end up with a corrupt file. (So, I had to resort to using FTP in some cases).

    Only semi related, If you are backing up systems at a datacenter and eventually sending them to a repository in the office (or vice versa) and sending them over a limited data line (we only had a couple T1's), you might want to look at the shaper app. I was able to limit the traffic heading over that T1 line after it was conglomerated on a datacenter server so that the users in the office could still do their work.

    After adding a few hooks to the various scripts to have it spew its progress to a central server that I monitor for errors, I had a fairly scalable script based backup system using built in backups (NTBackup on 2k/Xp/2k3 and Tar). Oh, and Bzip2 is your friend on the windows systems. Getting around 2GB file size limitations was the biggest pain in the whole setup. Go through some good QA and check every backup that is created for the first week; it sucks finding out your files are corrupted when you need them . . .
  • by Anonymous Coward
    Maybe try BackupPC [], which I believe supports rsync and SSH on Windows (with cygwin).

    Here's [] another good site on backing up Windows machines.
  • I'd suggest using a combo of https and webdav on the Linux box and Karen's replicator [] on the Windows side to keep consistancy.

    It's about as close as you can get to rsync on Windows without resorting to cygwin, plus it can run non-stop as a service.

    Hope this helps.
  • You want duplicity []. It'll run over SSH, and uses librsync. You get compressed backups, and compressed incremental changes. You can easily go back to the version of the file from a few days previously, or the latest version. It requires Python, librsync, and either a ssh or ftp server. You can make it work with cygwin, or with ActivePython + some other ssh server.
  • Making NTBackup operate at the command line can be tricky. You can use the backup wizard to create the bkf file for Exchange, and then specify it from the command line.

    Here is an example .bat file I use for naming and managing backups without the use of any external utilities. It is pure batch language on Windows 2000.

    Move the files to Linux any way you want.

    -begin backup.bat-

    rem Make room by deleting oldest files, leaving four newest

    for /F "skip=4" %%A in ('dir s:\backup\*email.bkf /o-d /b') do del s:
  • rdiff-backup does what you want.
    I have windows installers available:

    it solves your problem exactly

    I use it - get blat to email you the logs and you are sweet

A sheet of paper is an ink-lined plane. -- Willard Espy, "An Almanac of Words at Play"