D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Help: Script to backup /home to DVD



Keith Abraham wrote:

After some googling I've managed to produce the
following script to backup my home directory to DVD.
.......

It's my first attempt at writing a script so I'm
somewhat apprehensive. Would some knowledgable, kind
person run their eye over it and point out my errors?
In particular I'm not sure about my method of
storing and dating the tar file.

Keith

Keith,

A few quick thoughts.

The script itself looks pretty good. My main suggestions would be:
Add error checking after each action. Eg. Abort the script if you can't create /tmp/backup/keithhome and return a useful error code.
It's also good practice to use absolute path names for all your commands like you do for /bin/tar.


How are you planning on using the script? As it stands you are making an uncompressed tar file in /tmp, is the file system big enough?
Consider using compression.
If you just want a snapshot of your home directory why not just run growisofs on the directory itself?


I prefer to burn my backups onto cd-r dvd-r you can then keep backups from any snapshot.

How much of your home directory do you really need to backup? Mine is full of temp files which should be ignored. How big is it and how much will change between backups? If for instance the directory is 4GB a full backup will take a while. If only 300MB of files have changed then an incremental backup will be quicker.

Apologies if I have rambled on a bit. Hope it helps.

Pete


-- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.



Lynx friendly