Disable follow symlinks

I know that I can set directory flags for each directory (https://www.urbackup.org/administration_manual.html#x1-640008.3.4).

But how do I have to set the flag to disable “follow_symlinks” for a directory?

If i set /follow_symlinks it will activate “follow_symlinks”? But its already active by default? How can I disable it?

Thank you.

Does anybody have a solution for this? I also want it to NOT follow symlinks.

Oh wait, I think I may have answered my own question. When you define the flags you have to define all the flags you want to use regardless of if they are default or not, correct? So if I want to exclude follow_symlinks I don’t list it? But if I do want to have share_hashes I have to list it even though it is normally default?

Ex: /Users|Users/symlinks_optional,share_hashes

1 Like

Very good question witch I still find unanswered 2 years later.

I have to create a few symlinks within my drive. I HAVE to disable those symlinks or an aditional 1TB of data might be backed up witch would take 3-4 days for me so i cant just test it.
I cant exclude the links (they are generated (new names) and deleted during the day) and I need to backup the rest of the directory.

How I interpret the documentation there is no way to disable it, its enabled by default and I don’t see any “dont follow symlinks” flag.

Please help!!!

I have an open question on disabling follow symlinks configured on the server. See the thread on these forums titled “Directory backup options do not transmit from server to client as expected”. Nobody has responded to that thread yet, as I type this response here.

It does appear that you can disable symlink following if you configure things on the client end.

On Linux, the client configuration program is named “urbackupclientctl”.

If you want to backup /home and NOT follow symlinks, you would enter this on the client:

urbackupclientctl add-backupdir -f /home

The -f option tells it not to follow symlinks.

You can verify if the settings are as you want by running:

urbackupclientctl list-backupdirs

You can see what other options that you can set on the client end by running:

urbackupclientctl add-backupdir --help

Unfortunately, once you start adding things on the client end, then that client ignores anything you try and set on the server end (per the documentation). So it appears that once you start configuring things from the client end, then you have to continue doing future configurations from the client end forever. I would imagine (hope!) that other clients, the ones that you did NOT run urbackupclientctl on, would still use the server configuration. But I have not tested this.

Note: I am not a urbackup developer or anything like that. I’m just a confused user looking to get questions answered like you. Unfortunately, sometimes answers never appear. The developer(s) are busy developing I guess, and the users here seem a pretty quiet bunch much of the time. Probably because this is the kind of forum that users probably wouldn’t visit routinely. Most likely showing up here only when they are initially installing urbackup, or if they experience a specific problem down the road and need help. Many thanks to the subset of users who seem to be hanging around trying to help people. I see a few names that I recognize from years ago. One of the main reasons I chose urbackup years ago was because of the possibility that it may not be supported/developed in the future. I looked at how it stores backups and concluded that even if the urbackup program gets abandoned and stops working, I could manage to restore files manually just by copying them from the directory structure that urbackup creates. This is also why I chose EXT4 as my storage filesystem rather than BTRFS or ZFS. I do not know those other filesystems (volumes/subvolumes/etc) as well as EXT4 and might have more trouble restoring from scratch (i.e. - without the urbackup executable).

I actually got the answer from another post one day ago, namely THIS post.

Sadly it seems it does not work so I won’t risk trying it out, but the flag is apparently (not mentioned in the documentation) “-f” or “–no-follow-symlinks”.

Yes, that was my post. I have used --no-follow-symlinks in the past and it worked for me (as far as I remember - it’s been years since I used that option). The post you referenced was me asking how to configure the --no-follow-symlinks behavior (which is a client side option) from the server.

Why do you say that --no-follow-symlinks doesn’t work? Have you tried it, or seen some other post that reports that it doesn’t?

I assumed it didn’t work since the post SAID it didn’t work. LOL

I see you made a response on that post 2 hrs ago that you figured out how there are 2 different tags depending on if it’s set server or client side. Glad you got it working.

I ended up moving a whole drive because I couldn’t even figure out what any tag was since it was not mentioned among the tags in the documentation. Didn’t think about having to check the --help in the cli.

Anyway, glad you got this figured out, kinda.

Yeah, what didn’t work was transmitting the settings from the server to the client (or so I thought). But it DOES work when you make the settings on the client.

However, I was in error thinking that it did not work from the server. It does. But with the caveat I mentioned in the other post - you have to specify things slightly differently on the server than on the client. Plus, when interpreting the client output for list-backupdirs, you need to be looking for the absence of “follow_symlinks”, not the presence of “no_follow_symlinks”. That was my misunderstanding. I can successfully get my setup to not follow symlinks now, which is what I want. I hope what I eventually found was helpful to you too.

During my symlink testing I turned up another problem (or possibly another misunderstanding on my part). See my new post on virtual clients (one is offline, the other is online). That problem is not related to the symlinks one, but I discovered it while testing symlinks.

1 Like