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

Re: Save/Restore Symlinks



On Fri, May 30, 2008 at 08:03:23AM -0500, Chuck Rhode wrote:
> On Fri, 30 May 2008 07:00:17 +0200, Todd A. Jacobs wrote:
> 
> > On Wed, May 28, 2008 at 11:50:04PM -0500, Chuck Rhode wrote:
> 
> >> Alright, I want to back-up my *home* directory, but it has symlinks to
> >> other directories.  How do I get these back after a restore?
> 
> > Rsync has plenty of flags to handle symlinks in various
> > ways. However, if the *filesystem* of your backup media doesn't
> > support symlinks (e.g. vfat) then you should use tarballs rather
> > than per-file backup strategies to preserve your directory
> > structure.
> 
> Ah hah!  A response....
> 
> Yes, I am trying to rsync to a little SD camera memory card through
> USB, and, in fact, the card has a vfat format!  I'll try reformatting.
> I'd really like to use *rsync*.

You can do both: pipe the output of tar to stdin of rsync and have rsync
point to the tarball on the vfat card.  This minimizes the writes to the
card (the value of rsync) while giving you the ability to access the
card from other computers.  Note that instead of using tar's built-in
function to use gzip, you can pipe through external gzip and give it the
flag that will make the tarball amenable to rsync's algorithm.  See the
gzip manpage.

Doug.


Reply to: