Hi all, i don’t remember seeing this behavior before, but when i add a backup dir on a client like urbackupclientctl add-backupdir -d ~daanmageddon -n daanmageddon
, which holds a symlink ~/daanmageddon/somesymlink The symlink points to a filesystem outside the one where the dir is, like ~daanmageddon/symlink->/mnt/someotherfs/folder. The (incremental file)backup completes successfully, in the backup the symlink file is saved and not the target folder and everything under it.
urbackupclientctl list-backupdirs
shows /home/daanmageddon daanmageddon follow_symlinks,symlinks_optional,share_hashes No
for the relevant backupdir. I tried using /home/daanmageddon as a path instead of ~daanmageddon and also tried with the setting symlinks_optional removed (as far as i understood this has a different meaning; this makes the backup fail if it isnt able to backup the symlink contents -when follow_symlinks is on- or the symlink files -when follow_symlinks is off). In either case just the symlink file is backed up, but not what is “behind” the symlink. pls note “one_filesystem” is not enabled. The logs do not indicate any issues/warnings with the backup of the symlinks, only some errors related to snapshotting in the DEBUG web view live log, but those i am familiar with (as i have no snapshotting mechanism enabled). The log at /var/log/urbackup.log doesnt even get any updates for such an incremental backup, i guess that one only logs level>=warn. The log at the client side only mentions those snapshot errors, like in the web view live log DEBUG level messages, which are expected (still, maybe technically not because i have disabled snapshotting, but anyway i have seen them before so i suppose that is normal behavior in this scenario - its probably “by design”).
Recently (a whole other story, but goes outside the scope of this thread) i ran into database corruption errors which made me conclude i needed to start over from scratch. So this is quite a “clean” instance. In the sense that i think i maybe have forgotten to enable some setting i had set before, but i cant remember where or what that should be. As far as i recall, only the follow_symlinks setting is what controls this behavior.
To cancel out this is an issue with that particular client, on another client i created a new lv, formatted it, mounted it under /mnt/test, created a file /mnt/test/TESTFILE and linked to it from one already configured backupdir, like /someexistingbackupdir/link-to-test->/mnt/test, of course follow_symlinks is enabled for that (someexsting)backupdir.
In the subsequent backup only the symlink file “link-to-test” is backed up. Via the web interface i can download that file which is just an empty file, while the webview shows its a 18byte file. Investigating the backup store on the backup server i see something very interessting: a symlink that is pointing to ../rootfs/mnt/test
; “rootfs” is the name i gave to another backupdir on the same client, for which i have set one_filesystem, something i have set by default for any client. When i browse into the corresponding folder for that rootfs on the backup store i find that the mount folder for the test volume under /mnt isnt even backed up! So not only is the symlink not folowed but instead rewritten to target another backupdir, which doesnt even seems to have the folder on which the test volume is mounted on, and obviously the data “TESTFILE”, is nowhere in the backupstore. To be clear; i wasnt expecting to find anything under /mnt/test in the backupstore, but the folder “test” isnt even there. I guess this is a combination of trying to be efficient referencing another backupdir, i can see the benefit for that, but it doesnt consider the one_filesystem option for that other backupdir and doesnt backup the folder that is the mountpoint for that filesystem. I just checked and it seems that also on several clients any folders that are used as a mountpoint and have a fs mounted on them are missing. When there is nothing mounted on the folder, it does appear in the backup, weird. I think that was also different before, i remember only seeing the mountpoint, the folder, empty and reminding myself that i needed to include other filesystems as seperate backupdirs. Has that changed?
Maybe i just never noticed this, maybe this is a bug? I remember this behavior was different, i remember instead of the symlink ending up in the backup, the name of the symlink was there but instead of it being a file, it was a folder and in that folder the contents of the target of the symlink. I guess that is intuitive too. Checking another backup of a different client i see indeed in the root of the backups there are no folders like /dev /proc /boot or any other folder that is a mountpoint. I cant expect that to be intentional. Yes this is enabled, but my backupstore is btrfs, also unchecking that makes no difference.
Does anybody else see this and/or has an idea? (PSA: check your backups!)
Running the latest server 2.5.33 on Debian Bookworm bare metal, clients are 2.5.25.