I'm making a program to do a backup of my Minecraft server. The problem is, I can't let the server be offline when the backup is doing.
Does making the backup when the server is writing files will cause problems? if yes, there's any solution to that?
Also, a mariadb will be in the included in the backup too.
Prevent your computer from sleeping. If you are on Windows go to search bar > type control panel > open > Hardware and Sound > Power Options > Change Plan Settings > Sleep > Change to "Never" If you are on Linux, make sure in your power settings suspend is on "Don't suspend".
I have make a backup while the server is running many times. I have backed up by either using /backup or copying the worlds into another folder. It doesn't matter whether it's online or offline.
I think with backing up mariadb you can use mariabackup or mysqldump.
Note: It could be easier to use a plugin to backup your server: Server Restorer Plugin