LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   using tar for backup - error permission denied (https://www.linuxquestions.org/questions/linux-software-2/using-tar-for-backup-error-permission-denied-562733/)

homy 06-18-2007 02:14 PM

using tar for backup - error permission denied
 
Hi,

I'm using tar to backup the whole hard drive with root as username.
But having problem with permission denied.
my command was
tar clSf - . | (cd /mnt/newmount; tar xpSf -)

my current directory was /
even when I moved to ~/ still have same problem with these files ./.bashrc ...
I changed the permission to those files to 777 still have permission denied.

tar:./.bashrc: Cannot open: Permission denied
tar: Error exit delayed from previous errors

Please show me.

Thanks,

custangro 06-18-2007 02:23 PM

Hmm...I don't know what the problem could be....but I've always done that command like this:

Code:

tar -cf - . | (cd /destination/directory ; cat -xf -)
Also the destination directory must exist before performing that command...it won't create it for you.

homy 06-18-2007 03:01 PM

I'm using RedHat 9.0.
That was the problem.
I tried on Fedora Core 6.0 and it works.
But I really want RedHat 9.0.


All times are GMT -5. The time now is 06:59 AM.