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

compressing tar files / backup scripts



I've got a really simple backup script which goes like this:

tar -rvf backup$1.tar java/projects
tar -rvf backup$1.tar .mozilla
tar -rvf backup$1.tar bin
echo "compress the whole thing .... "
tar -czvf backup$1.gz.tar backup$1.tar


Basically I am using -r (the append option) to backup some directories and then I do a compress on the uncompressed file at the end. tar won't let me append and compress at the same time.

However a side-effect of this is in Windows - I transfer the backups across to another machine running Windows - when I open the tar file in winzip, I then see the uncompressed tar inside the compressed tar, so I then have to open that too.

Is there a better way to do this, avoiding the side effect with winzip?

For instance, writing a list of files to a temp file and then piping it all into tar in one go? Example commands of some such strategy would be great!


Thanks
Adam
--

Live in hope, die in despair.



Reply to: