rocket777
March 31st, 2011, 03:29 AM
In searching the forums, there's a thread on how to do a backup of your system using tar on the / directory (with some excluded dirs).
The problem is it puts the backup file right in / after you become su using:
sudo su
cd /
tar cvpzf ubackup.tgz .... /
I want to do my tar over to my windows share, as there's not enough room - I'd need over 50% free it would seem.
At first, I thought one could use smb://machine/share/... on the command line but this apparently does not work.
I found the .gvfs directory in my /home/me/.gvfs with a directory in it which is the share I just opened from the desktop. Provided I remain the logged in local user, I can access the share through this path using the command line.
Problem is, as superuser (via sudo), I can't access this share - but I must be su to tar up all of the "/" directory.
If I become the su then I can't even cd to the .gvsf directory.
I was also puzzled about the removing of / from member names as well, but that's probably a secondary issue.
Here's what I tried and the result:
cd "/home/me/.gvfs/share on xp"
sudo tar cvpzf ubackup.tgz --exclude=/proc --exclude=/lost+found --exclude=ubackup.tgz --exclude=/mnt --exclude=/home/me/.gvfs --exclude=/media --exclude=/sys --exclude=/dev /
[sudo] password for me:
tar: Removing leading `/' from member names
tar: ubackup.tgz: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
The problem is it puts the backup file right in / after you become su using:
sudo su
cd /
tar cvpzf ubackup.tgz .... /
I want to do my tar over to my windows share, as there's not enough room - I'd need over 50% free it would seem.
At first, I thought one could use smb://machine/share/... on the command line but this apparently does not work.
I found the .gvfs directory in my /home/me/.gvfs with a directory in it which is the share I just opened from the desktop. Provided I remain the logged in local user, I can access the share through this path using the command line.
Problem is, as superuser (via sudo), I can't access this share - but I must be su to tar up all of the "/" directory.
If I become the su then I can't even cd to the .gvsf directory.
I was also puzzled about the removing of / from member names as well, but that's probably a secondary issue.
Here's what I tried and the result:
cd "/home/me/.gvfs/share on xp"
sudo tar cvpzf ubackup.tgz --exclude=/proc --exclude=/lost+found --exclude=ubackup.tgz --exclude=/mnt --exclude=/home/me/.gvfs --exclude=/media --exclude=/sys --exclude=/dev /
[sudo] password for me:
tar: Removing leading `/' from member names
tar: ubackup.tgz: Cannot open: Permission denied
tar: Error is not recoverable: exiting now