Backup Script

Trying to get a backup script to run under crontab but it’s not going to well.

I only want to backup my documents that are worth a lot. (ie everything except my music and my videos).
Now my command is the following:

tar -cvpzf /home/chris/backup.tgz /home/chris/Documents

which works at backing up all thats in the Documents folder, to my home directory from where I can burn it.

Trying to stop backing up My Music and Video’s I use

tar -cvpzf /home/chris/backup.tgz /home/chris/Documents/ --exclude=/home/chris/Documents/My Music --exclude=/home/chris/Documents/My Videos

except thats not working at all.
Even if I add " to the locations

What am I doing wrong?

Got it sorted…

tar --exclude=/home/chris/Documents/My\ Music --exclude=/home/chris/Documents/My\ Videos -cvpzf /home/chris/backup.tgz /home/chris/Documents/

If I replace the c with a u, next time it runs will it only add files that have changed (and overwrite the ones that were already in there?)