- To: "Lester Cheung" <lcheung@xxxxxxxxxxxxxx>, <mkraus@xxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [SLUG] Travan tapes under GNU/Linux (Debian Woody)
- From: "Oscar Plameras" <oscarp@xxxxxxxxxxx>
- Date: Tue, 13 May 2003 10:50:03 +1000
- Cc: SLUG <slug@xxxxxxxxxxx>
>
> find /home/ -mtime -10 > /tmp/list && tar zcvf /dev/tape /tmp/list && \
> tar cvf -T /tmp/list |tee /tmp/tape.log
>
In your command line you are missing a '-T' in,
tar zcvf /dev/tape /tmp/list ; This will archive the file
'/tmp/list' itself;
so, tar zcvf /dev/tape -T /tmp/list. This will archive the file in the
list '/tmp/list'.
And you do not require 'tar cvf -T /tmp/list' because you are missing a
file parameter
which is '/dev/tape' after your 'cvf' and even then you will overwirte your
tape just
archived with one that is not compressed.
So, your command should be:
find /home/ -mtime -10 > /tmp/list && tar zcvf /dev/tape -T /tmp/list |
tee /tmp/tape.log
The above command will generate a file list that were modified less that 10
hours
ago, save it to '/tmp/list', archive a new file in 'gzip' compressed format
into
'/dev/tape', and generate a log into '/tmp/tape.log'.
Is this what you intended ?
In my case, I prefer to re-state the same command into,
tar zcvf /dev/tape -T `find /home -mtime -10` | tee /tmp/tape.log
You will notice that I do not have '/tmp/list'. This list is the
same as '/tmp/tape.log' so there is no need for it.
Incidentally, the 'z' compress format in 'tar' will save between
25 to 75 percent compression depending on the files you
have to be archive. If mostly binary compression is lower and
if mostly text compression is higher.