Re: Ghost for FreeBSD

From: James C. Durham (durham_at_jcdurham.com)
Date: 08/30/03

  • Next message: Guy Van Sanden: "Re: Upgrade 5.0 to 5.1"
    To: freebsd-questions@freebsd.org
    Date: Sat, 30 Aug 2003 14:17:17 +0000
    
    

    On Saturday 30 August 2003 01:02 pm, Stefan Malte Schumacher wrote:
    > Hi
    >
    > Well, just like the subject says I am for a program or a backup approach
    > simillar to the one I am currently using. I boot with a Dos-Bootdisk and
    > use Ghost to backup my Linux-Partitions to a FAT-Partition and then
    > distribute the images around different computers on the network. I would
    > like to be able to something like this with FreeBSD. I have had a look at
    > Ghost 4 Unix but this is mainly oriented towards deploying images via the
    > network while I just want to store the files locally. The advantage of
    > Ghost and Ghost4Unix is that is is very easy to restore the system even if
    > it so messed up that it wont boot. How can I do this ?
    >
    >

    If you use the tools you have on FreeBSD already installed , you can do most
    of what you want.

    For an image backup, you can use 'dd'.

    To back up the whole drive, which is better because you don't have
    to recreate partitons when you restore, just use the device name of the entire
    drive, which in this example we'll call ad0 .

    Let's say you have a machine called 'server1' with lots of disk space at
    /usr/backups out on your network somewhere.

    dd if=/dev/ad0 bs=16384 | ssh server1 "cat > /usr/backups/ad0_backup"

    In this example, dd outputs to standard out because you didn't tell it
    otherwise and inputs from /dev/ad0 and that is piped to ssh, which fires up
    'cat' on server1 and sends the file to it's local disk as ad0_backup.

    I usually use block size 16384, but you can vary this and pick what works best
    for you.

    To restore the file, you need a working system with ssh and a new drive
    connected. I use drive trays that you can get for 6 dollars US on the 'net so
    I can connect a new drive easily. (I have an old P90 system that I use for
    stuff like this with 3 drive trays).

    So, let's say you put the drive on a working system with ssh and it is
    discovered by FreeBSD as ad2. The drive has to be the same size as the
    original (or larger, but that's a waste with dd).

    ssh server1 "cat /usr/backups/ad0_backup" | dd of=/dev/ad2 bs=16384

    Now, move the new drive to the failed system as ad0 and boot it.

    You can also use tar and ssh to move a partition to a larger drive.

    cd /usr
    tar czf - . | ssh server1 "cat > /usr/backups/usr.tar"

    To restore, you need to create a same-size or larger partition on a new drive
    and mount it, let's say on /mnt..

    cd /mnt
    ssh server1 "cat /usr/backups/usr.tar" | tar xzf -

    -Jim

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Guy Van Sanden: "Re: Upgrade 5.0 to 5.1"

    Relevant Pages

    • Advice for dump/restore over SSH
      ... I'm having difficulties trying to clone a FreeBSD 7.1 PC to another exact same PC over SSH. ... I'm trying to dump/restore the /usr partition but I got warnings with the files already being present and it finally crashed SSHd just after transfering /usr/lib/libssl.so. ... My question is how do you clone PC over SSH. ...
      (freebsd-questions)
    • Re: resizing partitions
      ... partition management tools on a FreeBSD system. ... is there a strong reason that you must change the partition sizes? ... restore data. ... then after making dumps of each file system (except ...
      (freebsd-questions)
    • Re: resizing partitions
      ... partition management tools on a FreeBSD system. ... The best tools for this are dump and restore. ... identify next (in block order on the disk) partition to be grown. ...
      (freebsd-questions)
    • Re: Restoring Freebsd
      ... I wounder how to restore the ... > existing freebsd (it's installed in a separeted disk ... > partition) and to show the Freebsd boot manager. ...
      (freebsd-questions)
    • Christmas Tale - Happy Ending
      ... Semi-regular cloning of internal disc to external FW disc partition. ... The restore went without issue, ... I booted from the installation disc, ran Disc Utility, nuked the ...
      (comp.sys.mac.system)