Doug Crompton on 18 Aug 2005 06:17:43 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] disk to disk copy

I use a second (identical) drive as backup in my system. Below is the
script I use to make the backup. Should the primary drive fail the
secondary is identical. I don't worry about booting as I boot from a


# Backup Entire File System
echo "Last Backup - "`date` > /root/bin/last_backup
/bin/mount -t ext2 /dev/hdb5 /backup/boot
# hdb6 is swap
/bin/mount -t ext3 /dev/hdb7 /backup/root
/bin/mount -t ext3 /dev/hdb8 /backup/usr
/bin/mount -t ext3 /dev/hdb9 /backup/var
/bin/mount -t ext3 /dev/hdb10 /backup/home
/bin/mount -t ext3 /dev/hdb11 /backup/opt
/bin/cp -axu  /boot /backup
/bin/cp -axu  / /backup/root/
/bin/cp -axu /usr /backup
/bin/cp -axu /var /backup
/bin/cp -axu /home /backup
/bin/cp -axu /opt /backup
# unmount Backup File System
/bin/umount /dev/hdb5
# hdb6 is swap
/bin/umount /dev/hdb7
/bin/umount /dev/hdb8
/bin/umount /dev/hdb9
/bin/umount /dev/hdb10
/bin/umount /dev/hdb11

*  Doug Crompton	   *
*  Richboro, PA 18954	   *
*  215-431-6307		   *
*		  	   *
*        *
*  *

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --