Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] symlinks + rsync backup
Date: Sun, 21 Nov 2010 08:29:33
Message-Id: 201011210829.20738.michaelkintzios@gmail.com
In Reply to: [gentoo-user] symlinks + rsync backup by Pau Peris
1 On Saturday 20 November 2010 23:54:36 Pau Peris wrote:
2 > Hi, i'm doing a backup of a windows installation using rsync.
3 > Everything is working fine except for symlinks, the problem is that
4 > symlinks are taking absolute path so they're going to be broken as
5 > soon a paths get changed. look at the example:
6 >
7 > $ ls -la /mnt/rsync/vista/
8 > wxrwxrwx 1 root root 4096 nov 11 17:41 .
9 > drwxr-xr-x 5 root root 5 nov 20 12:10 ..
10 > lrwxrwxrwx 1 root root 56 mar 24 2009 Archivos de programa ->
11 > /mnt/vista/Program Files
12 > drwxrwxrwx 1 root root 4096 mar 24 2009 Boot
13 > -rwxrwxrwx 1 root root 333203 ene 21 2008 bootmgr
14 > -rwxrwxrwx 1 root root 8192 mar 24 2009 BOOTSECT.BAK
15 > lrwxrwxrwx 1 root root 40 nov 2 2006 Documents and Settings ->
16 > /mnt/vista/Users
17 > -rwxrwxrwx 1 root root 171136 sep 4 2009 grldr
18 > -rwxrwxrwx 1 root root 171136 sep 2 2009 grldr.bak
19 > drwxrwxrwx 1 root root 0 jun 1 2009 Jocs
20 > -rwxrwxrwx 1 root root 904704 dic 1 2006 msdia80.dll
21 > drwxrwxrwx 1 root root 8192 oct 27 17:03 ProgramData
22 > drwxrwxrwx 1 root root 4096 sep 6 21:58 Program Files
23 > drwxrwxrwx 1 root root 8192 oct 11 16:43 Program Files (x86)
24 > drwxrwxrwx 1 root root 0 mar 24 2009 RaidTool
25 > drwxrwxrwx 1 root root 0 mar 27 2010 $Recycle.Bin
26 > drwxrwxrwx 1 root root 4096 mar 24 2009 System Volume Information
27 > drwxrwxrwx 1 root root 4096 mar 24 2009 Users
28 > drwxrwxrwx 1 root root 264 nov 11 16:23 Windows
29 >
30 > The symlink "Archivos de programa -> /mnt/vista/Program Files" is
31 > wrong, it should point to the relative path, something like "Archivos
32 > de programa -> Program Files". rsync is called this way:
33 >
34 > rsync -aERPv --progress rsync://localhost/Windows-Vista-backup
35 > /mnt/rsync/vista/
36 >
37 > Do someone know which should be the correct options to create clone
38 > backup without breaking permissions neither symlinks? thanks in
39 > advanced :)
40
41 I haven't tried it, but have you experimented with these options:
42
43 -l, --links copy symlinks as symlinks
44 -L, --copy-links transform symlink into referent file/dir
45 --copy-unsafe-links only "unsafe" symlinks are transformed
46 --safe-links ignore symlinks that point outside the
47 tree
48 -k, --copy-dirlinks transform symlink to dir into referent dir
49 -K, --keep-dirlinks treat symlinked dir on receiver as dir
50
51 --
52 Regards,
53 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature