The rsnapshot warning message “Could not lchown() symlink” indicates that the rsnapshot backup utility encountered a problem while trying to set the ownership of a symbolic link during the backup process. The lchown() function is used to change the owner of a file, and it can’t be used with symbolic links.
Here’s how you can address this issue:
- Open a terminal window.
- To avoid the
rsnapshotutility trying to set the ownership of a symbolic link during the backup process, you can add thenoatimeoption to thersync_long_argsconfiguration parameter in thersnapshot.conffile. Here’s how to do it:
sudo nano /etc/rsnapshot.conf
This will open the rsnapshot.conf file in the nano text editor.
- Locate the
rsync_long_argsparameter and add the--noatimeoption to the end of the line, like this:
rsync_long_args --delete --numeric-ids --relative --delete-excluded --stats --noatime
This will prevent rsnapshot from trying to set the ownership of symbolic links during the backup process.
- Save the changes and exit the text editor.
- Restart the
rsnapshotservice to apply the changes:
sudo systemctl restart rsnapshot
This should resolve the “Could not lchown() symlink” warning message.