Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Data Storage

Using Linux for Windows HD Snapshots? 94

DBordello asks: "Our company is currently backing up weekly to tape. I would like to begin taking snapshots of our NT 4.0 server. My first thought was a Linux box running an Open Source solution. My research shows that most Open Source applications to take snapshots assume that the backup target is Linux based. This presents a problem with mounting the NT 4.0 server. While I could mount the share with Samba, all of the backup applications do not provide options to backup a local mount. What do you guys use to snapshot your Windows network?"
This discussion has been archived. No new comments can be posted.

Using Linux for Windows HD Snapshots?

Comments Filter:
  • hdup my friend (Score:5, Informative)

    by ptaff ( 165113 ) on Thursday June 26, 2003 @11:20PM (#6308391) Homepage
    hdup [miek.nl] should do the job. Simple, does monthly/weekly/daily and compression + encryption if you wish.

    Mount your NT filesystem via samba, specify your mounted directories to backup, put a crontab entry, that should be it.

    I use it daily to store a backup file on a the same host as the filesystem backuped - then fetching it using rsync with another machine for archival purposes.

    Won't keep NT permissions automatically, you should backup relevant permission files for Windows (anybody knows what they are?)

    • (anybody knows what they are?)

      Yes, part of the file system.
    • I wasn't very clear in my post. I am trying to create daily 'snapshots' of our server. Meaning I can go back and look at how my server looked exacly for the past 10 days. Hdup appears to do backups rather. db
    • OP : Look into Drive Image by PowerQuest.
      It is amazing, does exactly what you want, fits on a DOS7 boot floppy (make a boot floppy from a Win9x machine) and is really a great tool.

      Only caveat : you have to have multiple partitions, and the partition you are writing the drive image to must be recognized by DOS7 (Win9x) ie. FAT or FAT32.

      I generally build my machines with this in mind, my main partition is generally NTFS with a FAT32 partition large enough to hold the one I want to back up - Drive Image gene
    • Best thing to do to backup the ACLs seperately would be to use cacls and save the results. An image of the drive using something like V2i Protector from Powerquest or Norton Ghost from Symantec would be much more effective.
  • Linux has a driver for NTFS [sourceforge.net] already. Last time I looked, it was read-only, but that should suit you perfectly.
  • Amanda or SMBTAR (Score:5, Informative)

    by fdragon ( 138768 ) on Thursday June 26, 2003 @11:24PM (#6308408)
    I don't know how far you have researched this, but if you are running RedHat Linux 7.x, 8.0, or 9 you already have a solution with Amanda [freshmeat.net].

    Backup of Microsoft Windows machines happens via Samba shares of course, and it will run in agent or agentless mode.

    Agent mode of course gives you things like bandwidth throttling and compression of the network bandwidth usage. Agentless mode and you can back up anything you can mount.

    Typically you can have it use the smbtar(1) command (from Samba) to have it backup your windows machine.
  • One word: dd. (Score:4, Informative)

    by Mensa Babe ( 675349 ) on Thursday June 26, 2003 @11:24PM (#6308413) Homepage Journal
    With dd you can make a "snap shot" of any imaginable partition. No need to mount it. Just write dd if=/dev/hdc10 of=/root/backups/hdc10-`date -Is` or something similar, and it's done. I wish you good luck.
    • Re:One word: dd. (Score:2, Informative)

      by shepd ( 155729 )
      Unfortunately, this is only useful if the replacement hard drive is identical to the original.

      This often isn't the case. :-/
      • No. (Score:4, Informative)

        by Mensa Babe ( 675349 ) on Thursday June 26, 2003 @11:40PM (#6308472) Homepage Journal

        Unfortunately, this is only useful if the replacement hard drive is identical to the original. This often isn't the case. :-/

        No. It just means that you have to make a partition of at least the same size on the new hard drive, as on the old one. The new hard drives are usually larger, so it's not a problem at all. First use dd to back up the partition and record it on a new hard drive using fdisk (or cfdisk if yu cannot use a simple CLItool) first to make a new partition of the same type and size, and then dd again to write the actual data. It's just that simple.

        • Re:No. (Score:2, Funny)

          by shepd ( 155729 )
          So, if the new hard drive is smaller... what then?
          • Re:No. (Score:2, Funny)

            by Jahf ( 21968 )
            Then you bought the wrong hard drive.
          • So, if the new hard drive is smaller... what then?

            Is that some kind of joke?

            If the new hard drive is smaller then obviously you cannot write more data than what would fit. Isn't that obvious? If you want to move 40GB of backed up data to 30GB hard disk you are out of luck, no matter if you use dd or anything else. It's just a pigeon hole principle, pure and simple.

            • Re:Of course. (Score:2, Interesting)

              by shepd ( 155729 )
              >Is that some kind of joke?

              No. I'm beginning to think you haven't worked with tools like ghost yet...

              If I have a 220 GB HDD, but only 50 GB of data, and the drive explodes in flames and all I have left is a spare 80 GB drive, with your method, I'm screwed.

              With something like ghost, you aren't. You just put the image on the new drive, and wait until you get some drive space. And, as an added benefit, you get complete defragmentation, too.
              • It will still be readable and I believe if you chkdsk -r it, it will drop the unaccessable clusters.
                • >It will still be readable and I believe if you chkdsk -r it, it will drop the unaccessable clusters.

                  Does this work with ReiserFS, XFS, or any of the many other new non EXT filesystems?
            • Do you even _know_ what a "Pigeon Hole Principle" is? And your .sig is spelled wrong.

              I'm in a grumpy mood today. =P
        • If I remember correctly (from my 4.2bsd days), you can also run into trouble if your hard drives have bad blocks, and you revector them in the OS's file system driver. Doing a 'dd' on a raw partition would run into the bad blocks, and bad things may happen to your backup.
    • Re:One word: dd. (Score:4, Insightful)

      by djcapelis ( 587616 ) on Friday June 27, 2003 @12:43AM (#6308724) Homepage
      You have all the empty space still taking up room though. And this may be more for versioning and others where compression and other issues would be highly important. Especially if your trying to store 3 different copies of a few of these things, you don't want the extra room taken up by the empty space.

      All I have to say on the subject of your choice of a screename is that people smart enough to be in mensa should be smart enough to not be in mensa.
      • No need to mount it. Just write dd if=/dev/hdc10 of=/root/backups/hdc10-`date -Is` or something similar, and it's done.

        You have all the empty space still taking up room though. And this may be more for versioning and others where compression and other issues would be highly important.

        For the sake of simplicity I haven't piped it through gzip (or bzip2 for that matter) in my example. After all, it was only an example, for god's sake!

        All I have to say on the subject of your choice of a scre

        • He's not saying that being smart enough to be in Mensa means you're
          at least smart enough to not be able to be in Mensa; he's saying
          that Mensa is not well-regarded by smart people (which is true, as
          a general rule), and so if you're really smart, you would probably
          not be interested in their endorsement. This assumes, of course,
          that all smart people have the same views in such matters, but I'll
          leave the refutation of that supposition as an exercise.
        • Karma: Positive (probably because of superiour intellect)

          One of these days you'll get your sig right. Someone with such a superior should learn to use a spell check.
      • Couldn't you just zip the image or do something that uses RLE to get rid of the empty space?
  • Ghost 4 Unix? (Score:4, Informative)

    by CliffH ( 64518 ) <cliff.hairston@noSpaM.gmail.com> on Friday June 27, 2003 @12:28AM (#6308655) Homepage Journal


    Not that I've used it extensively yet (maybe someone else has) but Ghost 4 Unix (g4u) will do a bit for bit copy just like Ghost for Windows does, difference being that it is freeware and backs up to any ftp server with the appropriate credentials added. I think I'll go ahead and try it a little more this weekend actually.


    Here [feyrer.de] is a link to g4u.


    Cliff



    • Althought bit -> bit backups are nice, I need to do this daily. Dirvish [freshmeat.net] is similar to what I am looking for. I would like to take a snapshot of our server daily and keep several past snapshots. It seems that all of the snapshot tools don't provide any options for a samba mount. They treat a samba mount like a local drive and the results are not as one would want over the network.
      • rdiff-backup [stanford.edu] also takes snapshots, which are kept as reverse diffs. Very nice. A short word of warning though - running it on a p200 is slow. It probably has the same issues with samba as you describe.
        • Yeah, rdiff-backup is neat. I've been using it for a while now to take daily snapshots of one of my production filesystems, at a remote site where I don't have the bandwidth to do a normal backup remotely. Its also pretty cool when someone needs a restore to be able to do it immediately. I know that recent versions do quite a lot of metadata storing and theres been a lot of work on windows compatability (don't know what the staus is with NT acl's though - I'm using it between two Solaris machines).
    • Most people don't use software like ghost in bit-for-bit mode.
      • G4U has no relation, whatsoever, to Norton Ghost. There is only one way to use G4U: bit-for-bit backups.

        Next time, read the info on the page listed in the post you are commenting on. :D
        • Read the thread:

          Not that I've used it extensively yet (maybe someone else has) but Ghost 4 Unix (g4u) will do a bit for bit copy just like Ghost for Windows does, difference being that it is freeware and backs up to any ftp server with the appropriate credentials added.

          My schwinn will do 20MP/H, just like a porsche does.

          As far as having no relation, it doesn't take a rocket scientist to tell that 'ghost 4 unix' is a knockoff of the (now owned by norton) ghost.
    • I tried g4u, didn't like it. As far as I can remember its essentially...

      dd | gzip > file

      Which is probably okay if your partition is full, but otherwise sucks. It doesn't even seem to bother trying to zero slack space on the disk first.
  • by pb ( 1020 )
    It is the "tape archiver", after all. ...or--if you prefer--BRU, star, or some other tar relative.

    Combine with compression programs such as gzip, bzip2, compress, etc., as needed.

    rinse, lather, repeat.
  • Envy me ... (Score:3, Insightful)

    by Breakerofthings ( 321914 ) on Friday June 27, 2003 @12:30AM (#6308666)
    I am currently facing the same problem; here is my solution:

    A couple of weeks ago, I convinced my boss to let me replace our entire windows network (workstations; all servers are *nix) with diskless Linux workstations (Gentoo/OpenOffice/Evolution/Mozilla), all participating in a big happy openmosix cluster!!!

    (our builds will be speedy-speedy now!!!)

    So, my backup procedure will be:
    Step 1)back up the NFS server with the users' home dirs

    Step 2)Drink BEER!!!!
    • by Anonymous Coward
      3) Get fired for giving people 'Dickless Workstations'.

      4) No profit.
  • BackupPC (Score:5, Informative)

    by warmcat ( 3545 ) * on Friday June 27, 2003 @01:58AM (#6308950)
    BackupPC [sourceforge.net].
  • Partimage (Score:5, Informative)

    by ggeens ( 53767 ) <ggeens AT iggyland DOT com> on Friday June 27, 2003 @02:58AM (#6309082) Homepage Journal

    Partimage [partimage.org] makes an "intelligent" copy of a partition. I.e., it only copies the sectors that actually contain data. This gives a smaller backup than a full copy of the disk.

    It can read NTFS partitions, and it can connect to a remote server to store the file.

    They even provide bootable disk images, so you can use it without installing Linux on the NT machine.

  • by martin ( 1336 )
    www.amanda.org

    running via the cygwin port. A bit klunky but works for our servers.

    All user data is *NOT* kept on the desktop so I don't about backing up the workstations.
  • Maybe Ghost for Unix is what you need ?
    http://www.feyrer.de/g4u/

    "g4u ("ghost for unix") is a NetBSD-based bootfloppy/CD-ROM that allows easy cloning of PC harddisks to deploy a common setup on a number of PCs using FTP. The floppy/CD offers two functions. First is to upload the compressed image of a local harddisk to a FTP server. Other is to restore that image via FTP, uncompress it and write it back to disk; network configuration is fetched via DHCP. As the harddisk is processed as a image, any filesyste
  • We installed cygwin on our NT box. In addition, we are running sshd on it. At night, our backup box ssh's in an and runs tar to grab what it needs.

    very simple... and works.

    Chief
  • After a few hours of your post you will just have to let the NT4 servers go [slashdot.org], wont you :)
  • you dont! [slashdot.org]

    :-)
  • Dacula? (Score:3, Informative)

    by egghat ( 73643 ) on Friday June 27, 2003 @12:22PM (#6312061) Homepage
    Has anybody experiences with Bacula [bacula.org]? An NT client is available, the server side is on **ix.

    Just found it today, so I can't give any comments, but at least their claim is cool:

    "It comes by night and sucks the vital essence from your computers." :-)

    Especially interesting would ba a comparison to Amanda [amanda.org].

    Bye egghat.
    • Re:Dacula? (Score:2, Funny)

      by WarpForge ( 683567 )
      Bacula only works with Quantum [Leap] hard drives, which should be an adequate solution for the Enterprise.
      • Where did you get this info from? They claim in their FAQ, that most drives should be supported. DATs shouldn't be a problem for example.

        Bye egghat.
        • Scott Bakula (Bacula) was on Quantum Leap and is currently on Star Trek: Enterprise. Sorry if you didn't pick up that it was a joke. It should work as you state.
  • unattended (Score:2, Interesting)

    by Sepper ( 524857 )
    http://unattended.sourceforge.net/

    Not sure if it is what you are searching for though (it would not backup data)
  • http://backuppc.sourceforge.net/

    BackupPC is what we use. It works with both Windows and Unix, and lets you view the archives through a web interface (matter of fact, you can control any aspect of the backup process via web OR command line, for users or scripts, however you prefer)

    You can specify how many backups to keep and when to start deleting.

    For each backup, it later goes through and compares files with the last backup. If any match, it removes the file and makes a hard link to the old file to save
  • Well, as you have seen from the previous posts, the term snapshots is interpretted differently by different people.

    If you mean an image of the disk, when you say snapshot, then you will have to use something like partimage or ghost4unix. These will require that the NT4 server be shut down while the image is taken. The Norton Ghost for Servers can do live images.

    If you mean you want a point in time copy of the server's files, when you say snapshot, then Rsync is your friend, with Samba client. Look at this [mikerubel.org]
    • OK, we actually have only Linux/Samba/NFS boxes doing all fileserving, so we use rsync to replicate data to our hot-spare, but since rsync is available for windows (thanks to cygwin), it's no problem to use natively.

      You will lose ACLs, but you can do what we do (we use ACLs on XFS), dump them to file just before you run your snapshot (we use getfacl, but you could use the cacls tool on NT), allowing your file dump of the ACLs to be synced also. You can then apply the ACLs either after you have restored.

      Th
  • why not use some native windows program than can be run as a terminal service or maybee even make one that makes an image of the windows system, compresses it, and saves it on a network share. would this not serve the same purpose and also keep windows file permissions with NTFS?
  • Backup the NT server with NTBackup that comes with NT4

    then..um...take the tape and put it in a linux box to....um...have an open source "solution"

  • What do you guys use to snapshot your Windows network?

    Well, right before I got fired, I used a Canon G2 digital camera. I used to use a Fugi Finepix, but it didn't give me enough control over my Windows Snapshots. So one day our mail server dies, and my boss asks for me snapshots, and I brought them to him on a 128MB CF flash card. I still can't figure out why I got fired tho.
  • In a previous job, I worked with windows-based software under active development with the result that all programmers were recommended to prepare and keep available a "disk image". The idea was that you'd set up a test machine such that it was comfortable, had the development and debugging software you needed installed, and then backup the partition bit-by-bit. If the latest build left the machine in a confused state - perhaps the registry was polluted - it was simple to restore the image and try again with
  • Its priced reasonable, and is made for this sort of thing..

    Dont push a round peg in a square hole..

    I presume you can run the mulitcast server under wine and still use your linux server...

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...