Doug Crompton on 18 Aug 2005 06:17:43 -0000 |
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 floppy. Doug #!/bin/bash # # 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 # df # /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 # df # # 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 * * * * doug@crompton.com * * http://www.crompton.com * **************************** ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|