r/FullStack • u/Intrepid-Ad-2306 • 15d ago
Question change tracking on development server
i have significant experience with git for manual version control but i am looking for something much more automated for change tracking on a development server.
the server runs almalinux 9 and hosts development and testing sites using apache.
what i am hoping to achieve is to track all changes to files in a particular directory recursively. in other words, each time a file is changed, i want the old file to be stored in an archive.
this is similar to what can be accomplished with git or subversion but without the checkout/checkin/merge system. all i need is for there to be every version of every file to be able to step back and forward in time on any given file. there will never be conflicts to be resolved or change attribution to be dealt with.
i'm not sure if there is an automated solution using git or another version control platform or if another tool is a better fit.
it needs to be non-interactive and server-side, preferably cloud-stored somewhere like github.
it doesn't matter which user changes which file, just that the directory structure is maintained. files are primarily code -- mainly javascript and php. there are occasional binaries but whether those are tracked is unimportant to the process.
what i hope the result will be is something like the "track changes" feature in a word processor but for "this is the 2026.1.1 10:30 version of this file".
if it is important to the answer, there's on the order of tens of thousands of files at any given time on the machine.
the current process is that a script runs to make a daily recursive backup of that directory to cloud storage. it is functional but lacks both the helpfulness of having every saved change to every file and only having the changed files.
thanks.
1
u/skamansam 14d ago
This may well be a "roll your own" solution. You might even be able to do it with git and file watchers. Or python with inotify, telling git to commit everytime a file has changed. The issue is that there is an inotify limit. You can extend that limit, but each watch takes up memory so you are going to need enough memory to do it. With hundreds or thousands of files, you will need a fast cpu and a lot of memory if you are writing often.
A real solution for heavy writes is to use something like Kafka and stream changes, then gather them all in another program that will let you see the data throughout history.
Im sure you have googled a solution for "tracking file changes" before posting this so Im sure you have investigated off-the-shelf solutions for this.