[Linux] USB drive as backup
Robert Citek
linux@flux.org
Fri, 27 Jul 2007 10:05:11 -0500
On 07/27/2007 08:11 AM, Unique Wholesale wrote:
> I tried using tar to back my /home directories from a 80 gig drive to
> the usb 320gig drive. tar aborted after about 19 gig, giving error
> that drive was full. I checked, and only showed a portion occupied.
> Now, using df on the harddrive, the /dev/mapping shows full. However,
> using other checks, kfilemanager or might be kdiskmanager, the hard
> drive is on about 40 % used. I used tar cvf file.tar /mnt/usbdrive.
> This does not preserve the directories under /home.
Right. That command would create a file called "file.tar" of
/mnt/usbdrive in the current directory, which has nothing to do with /home.
> Is there a way to make tar create the sub-directories?
It does so by default. Is it possible the USB drive wasn't mounted?
> Also, not sure if related to above, I cannot startx to kde. Last
> message on return to prompt is error concernig the usb drive, and
> trying to fix something. I removed the usb plug, and commented out
> the line in the fstab file, and still get the error. Not at machine
> now, so cannot furnish exact error until tonight. I boot up to the
> login prompt, so still have access to command line.
Not sure if those are related. Although one possibility is that the USB
disk wasn't mounted and you filled up your local disk instead of the USB
disk. A full drive might prevent X from starting because it wouldn't be
able to create temporary files/sockets. But that's just a guess.
> What I would like to do at this point is get my /home directory files
> to the usb drive and do a new install on the hard drive. If I can
> still mount the usb drive, rsync looks like it might work. Again, not
> sure if it will preserve directories, but at this point I will take
> just the files.
Plug in your USB drive, mount it, run this script, and post the contents
of output.txt:
true ; (
sudo echo -n
set -x
cat /etc/issue.net
sudo fdisk -l
mount
df -hTl
) >& output.txt
Regards,
- Robert