plakar
plakar copied to clipboard
follow symlinks in VFS layer
We don't want to follow symlinks during a backup, however once the VFS is built, symlinks should be honored otherwise you end up with counter-intuitive failures when browsing.
To reproduce on OSX:
- plakar backup /etc (which is a symlink to /private/etc)
- the field importer.directory is
/etc - browsing the snapshot at
/etcreturns an error
On linux, with plakar v0.4.22-alpha, steps:
- plakar backup /bin
- plakar ls # note dbca776b is the hash
- plakar restore dbca776b
- inspect the restored bin/ folder
Notice the symlinks from /bin, are missing in the restored bin/ For example,
$ ls -al /bin/bzcmp
lrwxrwxrwx 1 root root 6 Jul 6 2021 /bin/bzcmp -> bzdiff
$ ls -al /bin/ypdomainname
lrwxrwxrwx 1 root root 8 Jul 6 2021 /bin/ypdomainname -> hostname
# looking at the restored folder bin/
$ ls -al bin/bzcmp
ls: cannot access 'bin/bzcmp': No such file or directory
$ ls -al bin/ypdomainname
ls: cannot access 'bin/ypdomainname': No such file or directory
$
This has been fixed in a recent commit and is already part of main:
$ ./plakar ls cb:/private/etc|grep aliases
2025-02-04T16:57:51Z Lrwxr-xr-x root wheel 15 B aliases
$ ./plakar cat cb:/private/etc/aliases| head -5
2025-04-03T16:17:57+02:00 warn: failed to connect to agent, falling back to -no-agent
#
# Sample aliases file. Install in the location as specified by the
# output from the command "postconf alias_maps". Typical path names
# are /etc/aliases or /etc/mail/aliases.
#