LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   TAR'ing multiple directories (https://www.linuxquestions.org/questions/linux-software-2/taring-multiple-directories-285805/)

bob_man_uk 02-03-2005 10:44 AM

TAR'ing multiple directories
 
hi all,

probably a no brainer question but i dont thave the time to research this, i need to backup multiple directories to one tar file which will then be put onto tape, I have a scripe that will do the backup to tape but i cant figure out how to tar multiple directories, i have approx 40GB of data most of which are drawings and office docs which will fit onto a 20gb travan tape (when using compression with tapeware, which has knackered)
i dont mind using two tape cos this will only be a weekly thing, daily I can trim the dross and make it less than 20GB,

any ideas welcome
if you would like me to rephrase please say so,

thanks

mattyG

__J 02-03-2005 10:52 AM

you mean like:

tar -cf myTar.tar dir1 dir2 dir3 dir4 etc...

or something else?

bob_man_uk 02-03-2005 10:59 AM

yeah thats what I was trying to do,

tar -cf /root /data /dnchost /drawings /backup.tar

but it falls over and i think its looking for the path /root/data/dnchost/drawings which of course doesnt exist, but if the PATH1 Path2 path3 etc is correct then how do you write the directories out to a tar file?

thanks

mattyG

__J 02-03-2005 11:08 AM

you gotta put the name first like:

tar -cf backup.tar /root /data /dnchost /drawings

note that this will put backup.tar in the current directory


All times are GMT -5. The time now is 08:02 AM.