How to backup to a tarball
Hi,
What is the best command line to backup all files in all sub directories after a certain date? Tar? gzip? Cheers |
tar will allow to gzip as you go, and it knows
about a Code:
-N, --after-date DATE, --newer DATE Cheers, Tink |
Thanks for the fast response.. so the command is
tar -N 2004-03-22 -czvf archive.tgz * Cant seem to make that work. |
After seraching around I could only find this command:
tar -zcvf archive.tgz `find . -newer temp.txt -type f -print` // all files after date of temp.txt |
It works for me, try to play with the date's
format... try american ;) tar -N 15/08/2004 -cvzf backup.tar.gz * Cheers, Tink |
Hi,
Here's what I get: [root@kirk ]# ll total 12 -rwxr--r-- 1 apache apache 1374 Jun 14 21:13 side.sql -rwxr--r-- 1 apache apache 1151 May 21 08:21 test1.txt -rwxr--r-- 1 apache apache 50 May 12 16:21 test2.txt [root@kirk]# tar -N 22/05/2004 -cvzf backup.tar.gz * tar: side.sql: file is unchanged; not dumped tar: test1.txt: file is unchanged; not dumped tar: test2.txt: file is unchanged; not dumped It produces a file with nothing in it!! Should produce a file with side.sql only If I try tar -N 05/22/2004 -cvzf backup.tar.gz * side.sql test1.txt test2.txt It backs up everything |
All times are GMT -5. The time now is 01:14 PM. |