MBG wiki | RecentChanges | Blog | 2024-12-23 | 2024-12-22

Backing-up your home directory

Zero level backup

You should periodically (once a month ?) make a full backup of your area (what is called a zero-level backup). This is easy :

rm ~/.tar
tar -g ~/.tar -zcvf /tmp/myarea_Date.tar.gz /home/myself
cd /tmp
ls -alFh myarea_Date.tar.gz
WriteCD myarea_Date.tar.gz
mount /mnt/cdrom/
diff /mnt/cdrom/myarea_Date.tar.gz ./myarea_Date.tar.gz           

                                    [if diff fails, your backup failed]

umount /mnt/cdrom/
rm myarea_Date.tar.gz

where 'myself' is your user name, 'Date' is the date (in the form 05Jun2005), and the ls command is used to allow you to confirm that your tar file is less than 700 MB.

Incremental backups

At the end of each working day, do an incremental backup :

tar -g ~/.tar -zcvf /tmp/Incremental_Date.tar.gz /home/myself
cd /tmp
ls -alFh Incremental_Date.tar.gz
WriteCD Incremental_Date.tar.gz
mount /mnt/cdrom/
diff /mnt/cdrom/Incremental_Date.tar.gz ./Incremental_Date.tar.gz
umount /mnt/cdrom/
rm Incremental_Date.tar.gz

Depending on how active (disk-wise) you've been, the incremental backups should be fairly small files (and you can fit plenty of them in one CD).