Duh! Question of the day....how do I backup a directory?
![](https://seccdn.libravatar.org/avatar/7425efe45e6e7ec4c614261e9f4ec516.jpg?s=120&d=mm&r=g)
I want to backup a directory to a mounted drive and I want to compress the hell out of it. Here's my thought tar -cZvf /mount/tom/coo.tgz /home/tom/cxoffice I want to compress and include all the files and folders in the cxoffice directory and keep them recursive. How far off am I? Tom -- Tom Nielsen Neuro Logic Systems 805.389.5435 x18 www.neuro-logic.com
![](https://seccdn.libravatar.org/avatar/2bb67b7da92340c04d11ff1eb7c52410.jpg?s=120&d=mm&r=g)
I want to backup a directory to a mounted drive and I want to compress the hell out of it. Here's my thought
tar -cZvf /mount/tom/coo.tgz /home/tom/cxoffice
I want to compress and include all the files and folders in the cxoffice directory and keep them recursive.
How far off am I?
Tom
Tom, I think bzip2 compresses tighter than gzip. I would use the -j option for bz2 compression. I think the rest looks good. -Jim-
![](https://seccdn.libravatar.org/avatar/63cf57a3adf2a94a6114d0921bd2ad37.jpg?s=120&d=mm&r=g)
On Wednesday 09 July 2003 00:40, Jim Norton wrote:
I want to backup a directory to a mounted drive and I want to compress the hell out of it. Here's my thought
tar -cZvf /mount/tom/coo.tgz /home/tom/cxoffice
I want to compress and include all the files and folders in the cxoffice directory and keep them recursive. <snip> I think bzip2 compresses tighter than gzip. I would use the -j option for bz2 compression. I think the rest looks good.
I'd use tar cjvf /mount/tom/coo-`date +%y%m%d%H%M`.tgz /home/tom/cxoffice and you're file has got a neat timestamp in the name... (if you want to do that automagically) Hansen -- Powered by SuSE 8.1pro - KDE 3.0.3 - KMail 1.4.3
![](https://seccdn.libravatar.org/avatar/95abe2615decea8cf22e5f9dcae5bd83.jpg?s=120&d=mm&r=g)
On Wednesday 09 July 2003 18:48 pm, Johannes Liedtke wrote: <snip>
I'd use
tar cjvf /mount/tom/coo-`date +%y%m%d%H%M`.tgz /home/tom/cxoffice ^^^
Uumm, shouldn't that be .tar.bz2 rather than .tgz? Of course, you can call it .bunch-of-bananas if you wan't but ...
and you're file has got a neat timestamp in the name... (if you want to do that automagically)
-- Vic Ayres http://www.buckiechoral.org.uk
![](https://seccdn.libravatar.org/avatar/63cf57a3adf2a94a6114d0921bd2ad37.jpg?s=120&d=mm&r=g)
On Thursday 10 July 2003 01:21, Vic Ayres wrote:
On Wednesday 09 July 2003 18:48 pm, Johannes Liedtke wrote: <snip>
I'd use
tar cjvf /mount/tom/coo-`date +%y%m%d%H%M`.tgz /home/tom/cxoffice
Uumm, shouldn't that be .tar.bz2 rather than .tgz? Of course, you can call it .bunch-of-bananas if you wan't but ...
you're right, of course... (but I like that .bunch-of-bananas idea, guess I'll put that into my script) :) Hansen -- Powered by SuSE 8.1pro - KDE 3.0.3 - KMail 1.4.3
participants (4)
-
Johannes Liedtke
-
jrn@oregonhanggliding.com
-
Tom Nielsen
-
Vic Ayres