Hi I have number of selected files to backup and it is also in different folders How can I make it easy?
eg: tar zcvf select-file.tar.gz from selected file or tar zcvf select-file.tar.gz (from selected files in file.txt)?
Thank you for your help
---------------------------------
Yahoo! Canada Toolbar : Search from anywhere on the web and bookmark your favourite sites. Download it now!
chloe K wrote:
Hi I have number of selected files to backup and it is also in different folders How can I make it easy?
Look at the -T or the --files-from option to tar. You can put all of the filenames in a single file and instruct to archive just the files listed in that one file. Is this what you want?
eg: tar zcvf select-file.tar.gz from selected file or tar zcvf select-file.tar.gz (from selected files in file.txt)?
tar zcvfT selected-file.tar.gx files.txt
On Sat, Nov 8, 2008 at 4:30 PM, chloe K chloekcy2000@yahoo.ca wrote:
Hi I have number of selected files to backup and it is also in different folders How can I make it easy? eg: tar zcvf select-file.tar.gz from selected file or tar zcvf select-file.tar.gz (from selected files in file.txt)?
Thank you for your help
I have no advice to offer if you insist on using tar, but you may want to look at rsync. You can preserve the directory structure, all flags, and use it only on a selection of files.
Peter
chloe K wrote:
Hi I have number of selected files to backup and it is also in different folders How can I make it easy?
eg: tar zcvf select-file.tar.gz from selected file or tar zcvf select-file.tar.gz (from selected files in file.txt)?
Thank you for your help
Check out the -T <file-list> or --files-from=<file-list> option. Something like: (Double check the syntax!)
tar zcv -T file.txt -f elect-file.tar.gz
You will probable find the tar info file more helpful then the tar man page.
Mikkel
Peter Langfelder wrote:
On Sat, Nov 8, 2008 at 4:30 PM, chloe K chloekcy2000@yahoo.ca wrote:
Hi I have number of selected files to backup and it is also in different folders How can I make it easy? eg: tar zcvf select-file.tar.gz from selected file or tar zcvf select-file.tar.gz (from selected files in file.txt)?
Thank you for your help
I have no advice to offer if you insist on using tar, but you may want to look at rsync. You can preserve the directory structure, all flags, and use it only on a selection of files.
If he wants multiple independent mirrors (e.g. a weekly CD), rsync is a poor choice because there would be no compression. If he wants a single mirror, I would recommend rdiff-backup.
Matt Flaschen
Thank you it works
how about untar
tar cvf file.tar -T selectfile.txt
inside the selectfile.txt
eg:
/var/www/html/version3/abc.html /var/www/html/version3/image/abc.jpg /var/www/html/version3/cgi-bin/abc.cgi
how can I untar it
as all inside in /var/www/html instead of /var/www/html/version3
Thank you again
"Mikkel L. Ellertson" mikkel@infinity-ltd.com wrote: chloe K wrote:
Hi I have number of selected files to backup and it is also in different folders How can I make it easy?
eg: tar zcvf select-file.tar.gz from selected file or tar zcvf select-file.tar.gz (from selected files in file.txt)?
Thank you for your help
Check out the -T or --files-from= option. Something like: (Double check the syntax!)
tar zcv -T file.txt -f elect-file.tar.gz
You will probable find the tar info file more helpful then the tar man page.
Mikkel