anything-sync-daemon icon indicating copy to clipboard operation
anything-sync-daemon copied to clipboard

Ability to specify number of backup for each folders

Open mizzunet opened this issue 3 years ago • 8 comments

This is my config,

WHATTOSYNC=('/home/missu/.mozilla/firefox')
USE_OVERLAYFS="yes"
USE_BACKUPS="yes"
BACKUP_LIMIT=2

I'd like to add ~/.cache/mozlla but do not want asd to take backup for this folder. Can I achieve this now? Would you be able to make it possible? So, the config to be like this,

WHATTOSYNC=('/home/missu/.mozilla/firefox'  '/home/missu/.cache/mozilla')
USE_OVERLAYFS="yes"
USE_BACKUPS="yes"
BACKUP_LIMIT=2
BACKUP_SECOND=0

As for now, a workaround is to, run two asd

mizzunet avatar Mar 26 '22 10:03 mizzunet

Right now it isn't possible, even I wanted to do it but some infrastructure change will be required to handle all this.

Adding BACKUP_SECOND is not really a good and scalable solution. My idea would be to allow users to install specific ASD configs from throughout the system by some asd install <config> command and the syncs will be handled by just one systemd instance of core-asd running in the system, It is just an idea and the feasibility of it is not tested at this stage.

Unfortunately, I don't have the bandwidth right now to work on it. If you'd be willing to work on this then I would be happy to review the PR. Otherwise, running two ASDs can work for the meanwhile as you said.

PS: If you are trying to sync the browser configs then I would suggest using profile-sync-daemon. I am not sure of its working but it is supposed to have some additional checks which are optimised for browser instances

manorit2001 avatar Mar 26 '22 12:03 manorit2001

If you are trying to sync the browser configs then I would suggest using profile-sync-daemon.

Agreed.

graysky2 avatar Mar 26 '22 13:03 graysky2

The reason I'm using asd over psd is that OpenRC is my init. I never have managed to get service file working properly. OpenRC can't have "user" service files.

While, asd is to be ran as root, it works perfectly for me.

mizzunet avatar Mar 26 '22 13:03 mizzunet

Though, asd starts fine by openrc service

mizzunet avatar Mar 26 '22 13:03 mizzunet

I honestly haven't reviewed asd's code base in a while. But psd definitely requires systemd.

graysky2 avatar Mar 26 '22 13:03 graysky2

Both require systemd.

I think maybe he is not able to mimick the behaviour of systemctl --user in OpenRC. I am not sure exactly but psd is supposed to be started for each user and asd is supposed to work system-wide. Maybe that difference is causing troubles for him

manorit2001 avatar Mar 26 '22 13:03 manorit2001

I honestly haven't reviewed asd's code base in a while. But psd definitely requires systemd.

asd also uses the same AFAIR, there is also some upstart config too but I haven't really used it

manorit2001 avatar Mar 26 '22 13:03 manorit2001

he is not able to mimick the behaviour of systemctl --user in OpenRC

It can't be. Someone has already requeted it, https://github.com/OpenRC/openrc/issues/432

mizzunet avatar Mar 26 '22 13:03 mizzunet