LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Using tar to backup a directory and subdirs (https://www.linuxquestions.org/questions/linux-general-1/using-tar-to-backup-a-directory-and-subdirs-27448/)

n1wil 08-07-2002 10:02 PM

Using tar to backup a directory and subdirs
 
I have been using tar to create backups of my /etc and my /home dirs on my RH 7.3 box. I can't seem to get the command to work anymore. I will paste the output below, could someone please shed some light on this??? Thanks.


[root@linux /]# tar -zcvf /home/* /backup/web.tar.gz
tar: Removing leading `/' from member names
home/a-flag.gif
tar (child): /home/775: Cannot open: Is a directory
tar (child): Error is not recoverable: exiting now
home/apache.gif
home/banner.jpg
home/beestungme/
home/beestungme/.kde/
home/beestungme/.kde/Autostart/
home/beestungme/.kde/Autostart/.directory
home/beestungme/.gtkrc
home/beestungme/.bash_logout
home/beestungme/.bash_profile
home/beestungme/.bashrc
home/beestungme/index.htm
home/beestungme/.bash_history
home/cableisp.jpg
Broken pipe
[root@linux /]#

what is a "broken pipe"?

What gives here? this used to work.

~ John

abrakadabra 08-07-2002 10:32 PM

Hi n1wil,
It is my understandig that the sytax for tar is as follows:

$ [command] [switches] [file-to-create] [ file-to-include]
e.g.
$ tar -czvf /temp/backup.tgz /what-ever-files-you-want-to-backup

So if we look at what you are trying to do is to create a /home/* with /backup/wet.tar.gz

you may want to confirm this with the man. That is man tar.

good luck!

:study:


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