FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-29-2008, 04:50 AM
Chuck Rhode
 
Default Save/Restore Symlinks

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?

I gather that *tar* saves link info, but *rsync*, using standard
file-system calls to create links in the backup directory, cannot,
when the destination is on removable media.

--
... Chuck Rhode, Sheboygan, WI, USA
... Weather: http://LacusVeris.com/WX
... 43° — Wind Calm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-30-2008, 04:34 AM
"Todd A. Jacobs"
 
Default Save/Restore Symlinks

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?

I'm not even sure I understand the question. If you back up a symlink,
and then restore the symlink, you still have a symlink. What's the
problem?

If you want to ensure you back up the TARGET of the symlink, rather than
the link itself, then use tar's --dereference flag.

> I gather that *tar* saves link info, but *rsync*, using standard
> file-system calls to create links in the backup directory, cannot,
> when the destination is on removable media.

Again, your question is exceedingly unclear. 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.

--
"Oh, look: rocks!"
-- Doctor Who, "Destiny of the Daleks"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-30-2008, 01:03 PM
Chuck Rhode
 
Default Save/Restore Symlinks

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*.

--
... Chuck Rhode, Sheboygan, WI, USA
... 1979 Honda Goldwing GL1000 (Geraldine)
... Weather: http://LacusVeris.com/WX
... 52° — Wind S 16 mph — Sky overcast. Light rain; mist.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-31-2008, 01:44 AM
"Douglas A. Tutty"
 
Default 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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-31-2008, 03:58 AM
Chuck Rhode
 
Default Save/Restore Symlinks

On Fri, 30 May 2008 15:30:28 +0200, Chuck Rhode wrote:

> 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.

The card was in the reader. Then here's what I did as root:

> umount /dev/sdc1
> mke2fs /dev/sdc1

Then, I took the card out and put it back in.

> chmod 777 /media/usbdisk/

Then, as user:

> rsync --archive --backup --force --recursive --update
> "/home/crhode" "/media/usbdisk"
> --exclude ".Trash"
> --exclude "/home/crhode/.mozilla/firefox/Profile0.default/Cache"

There were no errors. Symlinks look good in the destination
directory. Thanks!

--
... Chuck Rhode, Sheboygan, WI, USA
... Weather: http://LacusVeris.com/WX
... 68° — Wind WSW 6 mph — Sky mostly clear.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 10:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org