How would I configure Kopia to perform a backup every time a respiratory has changed? Can I safely use Kopia as a file versioning alternative for art assets?

Hello there :smiley:

Im about to start a remote little game studio with a couple of friends to make stuff for the android store.

Im therefore looking for neat file versioning solutions, as not everyone on our team are super technical - like our artists Im looking to find something thats easier to use than Git. Also as Ive noticed from past experience that git LFS is quite notoriously slow for projects that are just a few gb in size I simply do not consider git a solid alternative at this point - I need something fast, Kopia on the other hand is among the fastest backup/file versioning solutions that Ive tried.

So Im wondering, could I setup an SFTP/FTP server or similar where Kopia ensures that every time a file is changed in respiratory - a snapshot is taken. Ideally if someone say copies over maybe 5 folders and some files at the same time, it would all end up under the same snapshot. - Not sure how this would work in practice as FTP probably cant ensure that the files get written at the exact same moment when someone uploads a bunch of stuff all at once.

And contraversaly, if say 2 people on our team tries to modify the same file at the exact same point of time - through our FTP (Im open to any other solutions than FTP in particular). I would then need both of those versions stored as individual snapshots to prevent stuff from being overridden due to Kopia not getting enough time to perform backups before the respiratory gets modified again.

Any advice is welcome <3 The solution doesn’t necessarily need to involve Kopia, although I really have gotten a good first impression from it. Im all open ears

Perhaps don’t focus too much on “exactly the same time” and just have some script monitor those 5 dirs for changes. When they change, you run kopia against those dirs, and return to the script. If by any chance kopia ran while more files came in, they will just get picked up on the next round in the script. Losing half a days work is sad, but losing <5 minutes of work should not be super critical or you are doing something else wrong.

So something like:

Set change_last_time = now()
Check what time the dirs changed
if changed is later than now(), run kopia and update change_last_time
else if changed is older than now, sleep 30 seconds
Start over again from top.

This script would spend 99.99% of its day sleeping, and once it finds a changed file, it runs a backup. If it collides with more writes, it just runs a new kopia snapshot directly again, until it catches up, then goes back to sleeping.

It will not always “end up in same snapshot”, but the latest snap will have all files and dirs that existed when it ran.

If you on unix, there is utility called inotify (a package to install inotify-tools. On FreeBSD it is inotifywait , and on Windows ReadDirectoryChangesW API). You can feed it with directories it would watch and in your script do simplest file counter, if there create/modify event happened, then count it in a variable and if it get bigger than you want, then fire up kopia snapshot.

2 Likes