How do symlinks work?

I'm backing up my system with several different methods, some of which use symlinks (might only be Timeshift that does that, actually)
I'm using mergerfs at the moment, switching ASAP to the new Union remote type when 1.51 comes out :crossed_fingers:

My workflow (Not actual commands, just a map of the setup):

rclone mount Gdrive: /.backups/remote
mergerfs /.backups/local:/.backups/remote /Backups

Timeshift Backup -> /Backups/Timeshift
Aptik Backup -> /Backups/Aptik
Restic Backup -> /Backups/Restic

tmux; while:; do rclone move /.backups/local Gdrive: -P -l; sleep 1h; done

Without any flags on the move, I was getting an error that it won't follow symlinks without -L. I don't really want them followed, I want them copied, so I'm supplying -l according to this issue.

I see that the symlinks copy as text files with an extension:

If you supply this flag then rclone will copy symblic links from the local storage,
and store them as text files, with a '.rclonelink' suffix in the remote storage.

I'm guessing this will be problematic if I were to use Timeshift to try to restore a snapshot- it'll be expecting symlinks but find .rclonelink files everywhere.
Also, if I rclone copy everything back down, will those files end up copying as symlinks, or remain as text.rclonelink files?

Any suggestion for fixing that? Or am I misunderstanding?
Just trying to figure out how to make this work well in the future. (Maybe that means ditching Timeshift- open to that)

They will turn back into symlinks at that point. So presumably this would fix the problem with Timeshift?

1 Like

Excellent! That being the case, everything ought to work flawlessly.

Thanks Nick!

1 Like

Can I ask as a followup - what is it that triggers it being renamed back?
Being copied to a location rclone can identify as a local filesystem?

When the destination is the local filesystem the file.rclonelink will get converted back to symlinks if the -l flag is set.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.