Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Using Linux for Windows HD Snapshots?

Posted by Cliff on Thu Jun 26, 2003 10:12 PM
from the drive-imaging-but-not-with-a-camera dept.
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?"
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • hdup my friend (Score:5, Informative)

    by ptaff (165113) on Thursday June 26 2003, @10: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
  • 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) <fdragon.fdragon@org> on Thursday June 26 2003, @10:24PM (#6308408) Homepage
    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, @10: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, @10: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.
        • 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 Thursday June 26 2003, @11:43PM (#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

          • Then make a 2GB file full of zeroes, and delete it. Doh. Some people...

            Now if you had said it takes a LONG time to do it then I'd agree with you - I backed up a few of my HDDs this way and piping stuff to gzip sure makes it a lot slower. In some parts the read transfer rates drop to 7MB/sec on my Athlon 2000XP. I can't afford a processor that's twice as fast. Having a bigger backup HDD is cheaper - still, even setting gzip to lower compression settings doesn't make it as fast as I like - 90 minutes to back
            • Hey, don't mock me. I just spent all night spastically jerking my mouse around and uploading all of my music to various FTP servers just to be able to eek 200MB from /dev/random. Now I just need to find a way sell it.
  • Ghost 4 Unix? (Score:4, Informative)

    by CliffH (64518) <[moc.oohay] [ta] [notsriah_notfilc]> on Thursday June 26 2003, @11:28PM (#6308655) 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.
      • 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
  • 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 Thursday June 26 2003, @11:30PM (#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!!!!
  • BackupPC (Score:5, Informative)

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

    by ggeens (53767) <{ggeens} {at} {iggyland.com}> on Friday June 27 2003, @01: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.

  • 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
  • you dont! [slashdot.org]

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

    by egghat (73643) on Friday June 27 2003, @11:22AM (#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.
  • 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?
  • 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.
  • 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...