[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rdiff-backup-users] Symlink backup error message; symlink creation time
From: |
Eric Jensen |
Subject: |
[rdiff-backup-users] Symlink backup error message; symlink creation times reset upon restore |
Date: |
Wed, 20 Jun 2007 11:10:55 -0400 |
Hi all,
I'm working with the new 1.1.11 release, and I was pleased to find that
I'm now able to perform a simple test backup from Linux to an
SMB-mounted filesystem, which doesn't allow symlinks - thanks!. I
backed up a single directory, with both a real file and a symlinked
file. It gave me an error:
SpecialFileError symlink_file [Errno 1] Operation not permitted
while backing up, but did properly store the file's metadata, and it
restored it as a symlink when I did a restore.
Two questions:
1. Should this error occur? It appears to be backing up the data OK.
Maybe just a warning at the beginning that the target filesystem
doesn't support symlinks. (At the default verbosity level, I get a
warning about hardlinks, but not about symlinks.) If I back up a
larger directory, I get one of these errors for every symlink in the
source tree.
2. After restoring, I noted that the modification time on the symlink
was different from the target:
Target directory:
# ls -l /root/test/test2
total 4
-rw-r--r-- 1 root root 9 Jun 20 10:38 realfile
lrwxrwxrwx 1 root root 25 Jun 20 10:38 symlink_file ->
/root/test/test2/realfile
Restored directory:
# ls -l /root/test/test2.restored/
total 4
-rw-r--r-- 1 root root 9 Jun 20 10:38 realfile
lrwxrwxrwx 1 root root 25 Jun 20 10:42 symlink_file ->
/root/test/test2/realfile
I see that the creation time on the symlink file has been changed to be
the same as the time of the restore (10:42), while the target directory
from which the backup was made has a symlink creation time of 10:38.
Looking at the file metadata, I see that there is no ModTime stored for
symlinks, only for regular files:
File realfile
Type reg
Size 9
SHA1Digest 572c291421cd821a5e821e28766d0bdb719c379d
ModTime 1182350320
Uid 0
Uname root
Gid 0
Gname root
Permissions 420
File symlink_file
Type sym
SymData /root/test/test2/realfile
Uid 0
Uname root
Gid 0
Gname root
Permissions 511
So it appears that this is simply the default behavior of rdiff-backup.
However, it strikes me that it is useful to preserve information about
when a symlink was created, and that it seems (at my very naive level of
understanding) that the infrastructure is already in place in the
rdiff-backup code, since this information is stored (and restored) for
regular files. So perhaps this falls under the category of a feature
request, but perhaps also there's some fundamental reason not to do
this.
Thanks as always for a fine piece of software.
Eric
- [rdiff-backup-users] Symlink backup error message; symlink creation times reset upon restore,
Eric Jensen <=