[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tar on flash drive



--- dtutty@vianet.ca wrote:

From: "Douglas A. Tutty" <dtutty@vianet.ca>
To: postid@BasicISP.net
Cc: debian-user@lists.debian.org
Subject: Re: tar on flash drive
Date: Mon, 19 Jan 2009 11:05:44 -0500

On Sun, Jan 18, 2009 at 11:25:01PM -0800, postid@BasicISP.net wrote:
> I have a damaged system on my laptop and am trying to salvage data,
> then will likely install a new system (etch or lenny, was sarge). I'd
> like to save the home folder and a few useful files gleaned from the
> etc folder, keeping permissions. I'll use a live cd to do the salvage
> work (lenny live, knoppix, knoppix STD or slax -- I have all
> available) and write to a 4GB usb flash drive. 
> 
> Is this the proper syntax? I believe the -c must be first and the -f
> last.
> 
> tar -chpvf /mnt/sda1/homebackup.tar /mnt/hda2/home
> 
> -c is create a new archive -h is retain symlinks but not the files to
> which they point -p is preserve permissions -v is verbose -f is
> indicating that the destination file name follows immediately after
> 
> Is -h the best way to handle symlinks?  Is having the destination file
> on a flash drive a potential problem? 
 
> Your input is appreciated. Please cc me as I am not currently
> subcribed to the list.

[done]

For what it does, yes your tar options look fine.  Are you sure that you
want to lose other stuff such as /etc, your package choices, etc?

I'll attach the script I use.  I alter it for each box (since each is
slightly diffferent).  The script I'm attaching is what I run on the box
from which I'm sending this email (plot).  It uses a list of directories
to backup and a list to exclude.  I'll include those files too.

Doug.


Thanks, gentlemen for your input.

I was aware of needing to save some things from etc, so I had copied the contents of fstab, modules, hosts, inittab, network/interfaces and resolve.conf into a text file. I had also copied the contents of grub's menu.lst and copied the folders modprobe.d, modutils and ppp. I had copied some files from home, hoping that somewhere in there (a subfolder in a dot file?) were the browser bookmarks, address books and e-mail folders. It was then that I got to thinking about the symlinks and using tar rather than simply copying.

I'll save what I need on CDs so I'll have to do tar a handful of times, recording bite-sized chunks that the CDs can swallow. Wish I had a DVD burner. I'll tar to the flash drive, then transfer those tar folders to CDs. 

Again, thanks for your input and scripts.

postid





Reply to: