I have a very large server (Minecraft) using tens of gigabytes of files. Every two days, I make a backup, but since the server is so big, I have to shut it down for 45 minutes until the backup is done.
If I backup while the server is running, the backup folder gets corrupted because not all files were backed up at the same time and there's duplicate data, missing data and other problems. Chmodding the server folder recursively to 440 (read-only) makes the server spam thousands of errors, and sometimes crashes it or corrupts data.
What I am trying to do is to switch the server to read-only mode, but to allow it to write to temporary "journal" files which will be written to the real files once the backup is finished.
Is this possible at all? If yes, what tool should I use to do this? I was thinking something such switching the server folder to a soft link to a folder or partition that simulates this.