[LBo] question about using tar.gz for home backup

Douglas Orchard duglas at twcny.rr.com
Wed Sep 5 22:46:07 CEST 2007


> I was reading the sidux page on backing up your home:
> http://sidux.com/index.php?module=pnWikka&tag=SecureHomeEN
> 
> I had been using the line:
> tar cvzf /home /somewhere/home.tar.gz
> 
> they mention using:
> tar -cf - /home | gzip -c9 > /somewhere/home.tar.gz

In the first method the command "tar" uses the z option to compress:
One command.
In the second method the pipe takes the output of one command and
delivers it to the second command:  Two commands.

The theoretical end result is two commands take longer than one.
In practice your milage may vary.

FWIW I use the following:
tar -cpjf ~/Bakups/`date +%m-%d-%y`-user.tar.bz2 (here is a list of
files to be backed up).

The -p is preserve permissions and the -j is use bzip2 instead of gzip
and  the command "date" in back-ticks gives a unique filename to the
output file.

keep on backing up!


-- 
Douglas Orchard

Registered Linux User
# 206698


More information about the QnA mailing list