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
rsnapshot
utility trying to set the ownership of a symbolic link during the backup process, you can add thenoatime
option to thersync_long_args
configuration parameter in thersnapshot.conf
file. 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_args
parameter and add the--noatime
option 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
rsnapshot
service to apply the changes:
sudo systemctl restart rsnapshot
This should resolve the “Could not lchown() symlink” warning message.