From owner-freebsd-questions@FreeBSD.ORG Sun Oct 22 19:32:32 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4E6016A4DE for ; Sun, 22 Oct 2006 19:32:32 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50A7043D45 for ; Sun, 22 Oct 2006 19:32:15 +0000 (GMT) (envelope-from stapleton.41@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so980953uge for ; Sun, 22 Oct 2006 12:32:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=I5Lg1nt7xNICMpIAhnqQmN+FzbW+o0T/wjrnjYBIHZYISX4kCbnCbybyvXrP+jcGH3EymtoPSBpdmpcngk/6WK2wmWyBnT0+kUSsY/352AeJNellaAeJDlk4i500ITj23ww9JMMQtDu9C53Nk/UY3oskg+2jmej6QwGh0xqJh8g= Received: by 10.67.97.7 with SMTP id z7mr5959526ugl; Sun, 22 Oct 2006 12:32:11 -0700 (PDT) Received: by 10.67.86.18 with HTTP; Sun, 22 Oct 2006 12:32:11 -0700 (PDT) Message-ID: <80f4f2b20610221232m192b7d3di7b0ccefce22cd57f@mail.gmail.com> Date: Sun, 22 Oct 2006 15:32:11 -0400 From: "Jim Stapleton" To: freebsd-questions@freebsd.org In-Reply-To: <1b6a9c1b5cb2.1b5cb21b6a9c@reyrey.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1b6a9c1b5cb2.1b5cb21b6a9c@reyrey.net> Subject: Re: Backing up SOHO server X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2006 19:32:32 -0000 Hmm, not familiar with "dump" or "restore", but what I would suggest, is when you can get some down time, boot from a live cd, and using a dd/bzip2/split combo (or any other method of your choice), make a backup image of the drive as well, If you get a new drive with the same size/etc, it'll massively speed up the reinstall phase. When you recover, all you need is cat/bunzip2/dd to do the restore. It's quite a bit faster than a reinstall, especially if you compile your own apps - it saved me a lot of time when my notebook died. Sorry I couldn't be more help with your specific questions. -Jim Stapleton On 10/22/06, esavage@reyrey.net wrote: > All, > > I have freebsd 6.1 installed running Samba authenticating my home users and pc's and home shares for each user. This also serves as a web development box for my internal network. Because there is a login script that runs to map drives on the remote pc's all users are accustomed to dumping there important data there. I am trying to come up with a backup and restore plan. > > Just plan to do complete dumps with the script below once a week which is good for me due to the fact of how the box is used. If a total drive crash happens I will just reinstall from cd then use restore to recover the dump. I am backing up to a usb drive connected to the server. I have printed the file system and taped it to the top of the usb drive hehehehe. > > Any other input would be appreciated. Also on the restore portion I plan to just cd into that slice and run > > dd if=/mnt/backup/file/ |gzip -d |restore -rf - > > Since this is for home use and protection for only disasster/drive failure a new install will be done, will retore over write what is there to restore the old contents? > > vader# df -H > Filesystem Size Used Avail Capacity Mounted on > /dev/ad0s1a 260M 55M 184M 23% / > devfs 1.0k 1.0k 0B 100% /dev > /dev/ad0s1g 20G 10G 8.1G 56% /home > /dev/ad0s1d 1.0G 223k 954M 0% /tmp > /dev/ad0s1f 12G 2.5G 9.0G 22% /usr > /dev/ad0s1e 4.2G 620M 3.2G 16% /var > /dev/ad4s1 242G 122G 100G 55% /music > devfs 1.0k 1.0k 0B 100% /var/named/dev > /dev/da0s1d 116G 6.8G 100G 6% /mnt/backup > vader# more /etc/fstab > # Device Mountpoint FStype Options Dump Pass# > /dev/ad0s1b none swap sw 0 0 > /dev/ad0s1a / ufs rw 1 1 > /dev/ad0s1g /home ufs rw 2 2 > /dev/ad0s1d /tmp ufs rw 2 2 > /dev/ad0s1f /usr ufs rw 2 2 > /dev/ad0s1e /var ufs rw 2 2 > /dev/ad4s1 /music ufs rw 3 3 > /dev/acd0 /cdrom cd9660 ro,noauto 0 0 > > The backup script > > vader# more dumpbackup.sh > #!/bin/sh > mount -t ufs /dev/da0s1d /mnt/backup/ > dump=/sbin/dump > chflags=/bin/chflags > dt=`date +%Y%m%d` > destpath=/mnt/backup/file > lvl=0 > > # / > src1=/dev/ad0s1a > # /home > src2=/dev/ad0s1g > # /var > src3=/dev/ad0s1e > # /usr > src4=/dev/ad0s1f > > dest1=$destpath/root_ad0s1a_l0_$dt.gz > dest2=$destpath/home_ad0s1g_l0_$dt.gz > dest3=$destpath/var_ad0s1e_l0_$dt.gz > dest4=$destpath/usr_ad0s1f_l0_$dt.gz > > # Exceptions NO BACKUP > $chflags -R nodump /usr/ports/ > $chflags -R nodump /usr/src/ > $chflags -R nodump /usr/obj/ > $chflags -R nodump /mnt/backup/ > > # Fullbackup Level 0 Monthly > $dump -$lvl -Lauf - $src1 | gzip -2 | dd of=$dest1 > $dump -$lvl -Lauf - $src2 | gzip -2 | dd of=$dest2 > $dump -$lvl -Lauf - $src3 | gzip -2 | dd of=$dest3 > $dump -$lvl -Lauf - $src4 | gzip -2 | dd of=$dest4 > > #Finish Comments > umount /mnt/backup/ > echo "Finished Another Weeks Backup" > vader# > > > > > _______________________________________________ > 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" >