You are not logged in.

#1 2024-02-19 00:45:47

meckchat
Member
Registered: 2024-02-19
Posts: 2

[SOLVED] YARsync saves snapshots forever?

Hello,

I am setting up a backup server, and while reading the Synchronization and backup program wiki page, I got interested in YARsync as a tool. I liked the seemingly similar syntax to git.

I have read the documentation as carefully as I could, but there is something I don't understand: how do you take care that the number of snapshots (or commits) does not grow indefinitely? I didn't see obvious commands, such as deleting commits prior to a given one, setting the maximum depth, or something else.

I am new on this forum, so please forgive me if this is the wrong category. I saw that there was a post in the forum by one of the developers, so I thought it might fall in the scope of this forum.

Thanks

Last edited by meckchat (2024-02-21 17:12:35)

Offline

#2 2024-02-21 11:11:18

ynikitenko
Member
From: Aachen, Germany
Registered: 2020-11-15
Posts: 44
Website

Re: [SOLVED] YARsync saves snapshots forever?

Hi,

thanks for your interest in the program and the private notification!

What is your use case?

Yes, you are right, yarsync has a nice human-oriented syntax. But at the same time, it is not meant for something "automatic" (like regular snapshots), it's more like git (it runs when you manually call it). Also keep in mind that the "snapshots" are hard links to files, that is why if you change a file later, the previous content will change.

There is no command to delete snapshots. In my use case I have many separate repositories and I don't store every minor change as a commit (I necessarily do commits only when I may need to synchronize the repo). For one of my oldest repositories I have just counted 17 commits. This should never be a problem on an ext4 filesystem.

But when and if you feel that you have too many commits, you can just delete them manually. I would also call it a "pro" side of the program, because it is very simple in implementation. There is no such command yet because a) I never needed that b) possible implementations can vary. For example, should we keep the very first commit when deleting old ones? It might be useful in some cases. If you have further ideas, please share.

Sorry for a long answer. In fact I've just remembered that I implemented a "commit limit", see special repositories in the manual. I'm glad if it helps you.

Offline

#3 2024-02-21 16:48:35

meckchat
Member
Registered: 2024-02-19
Posts: 2

Re: [SOLVED] YARsync saves snapshots forever?

Hi,

Thank you for the reply!

My use case is to make backups of data from various sources on a remote host server, with snapshots of previous backups stored (like TimeMachine in MacOS). I was thinking of using YARsync on the host server to keep snapshots of the latest data backup (eg /my/data/latest/). However, I have a finite amount of storage available, so I anticipate that I will periodically delete old snapshots to keep the backup size below a certain threshold.

I didn't realize all the snapshots would be stored in a human-readable way in the configuration directory. So if I can simply delete snapshots manually periodically, that works for me. I'll also get a look at the "commit limit", although I don't think my criterion for commit deletion is the number of hard links, but rather the size on disk.

Offline

#4 2024-02-21 17:10:33

ynikitenko
Member
From: Aachen, Germany
Registered: 2020-11-15
Posts: 44
Website

Re: [SOLVED] YARsync saves snapshots forever?

Just an important warning: this is not an exactly "backup" program. It doesn't store copies of files (see comparison in the wiki)! And in that sense, it doesn't take any additional space for snapshots (I hope you understand what hard links are). The only additional space would be if you deleted some files and they are (by default) still saved in old commits. This program is for storing unchanged files. Hope this works for you well.

Offline

Board footer

Powered by FluxBB