Best way to backup my Paper Minecraft server?

I am looking for the best way to perform a simple nightly backup. I am pretty comfortable creating a cron job to rsync the whole folder, but I wasn't sure if that could potentially lead to corruption if it is copying files while players are playing the game.
27 Replies
Admincraft Meta
Admincraft Meta2mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by hoodiecthulhu#0
1who¡ssus?
1who¡ssus?2mo ago
A plugin with cloud sync There's a good one
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
Any suggestions?
Torrent
Torrent2mo ago
It will not lead to corruption Use cronjobs
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
Even if I am doing a zip/rsyn during a save operation? I am seeing lots of people reccomend using /save-off before backing up, but obviously that isn't an option without a plugin if I'm doing it automaticalyl.
Torrent
Torrent2mo ago
No reason to do that whatsoever Also Use tar.gz
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
Yeah that's what I use
Torrent
Torrent2mo ago
Then you’re good Pointless to turn auto save off that’s just another point of failure if you forget to turn it back on I assume you’re running the server in docker?
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
Yes, using marctv/minecraft-papermc-server Right I wouldn't do it manually. I would assume a plugin is just running a cron job but communicating with the server to make sure it's not in a bad state for saving If there's really no issue with copying server data while it's running I will probably just use rsnapshot
Torrent
Torrent2mo ago
crontab -e -> 0 23 * * * tar -czvf name-of-archive.tar.gz /path/to/directory-or-file Optionally you can specify a location for the file like a backups folder Again I think there’s nothing to worry about there I have archived a thousand backups without turning off auto save As have many, many users here as well as anyone who has used pterodactyl’s backup feature
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
I'll ask the obvious: and restored from them without issue?
Torrent
Torrent2mo ago
Yep And migrated giant backups of my entire system to new dedicated servers No issue Or data loss
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
I would assume Ptero is communicating with the server no? Cool Just feel like I should double check
Torrent
Torrent2mo ago
Ptero doesn’t, wings is what manages the containers Ptero is just the panel interface But yeah, essentially
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
Very happy if ti works that way, and I am pretty comfortable with cron so I'll get it working easily. I just didn't want to make assumptions and then have a bunch of corrupted backups that aren't super fun
Torrent
Torrent2mo ago
If you’re looking for a better system for managing your server I would recommend ptero highly The only way it would end up corrupted is if you tried to unarchive it in a stupid way tar -xzf is extremely safe and well tested
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
I tar -xzf'd a bunch of running databases and ended up with issues in the past. Might've been a separate error on my part, but now I'm wary. Yeah I should look into Ptero. Does it play nice with Velocity?
Torrent
Torrent2mo ago
It plays very nice with any type of server software you want to use There are pterodactyl eggs for lots of different types of software, but you can manually upload any server implementation and be fine Easy management of multiple servers and nodes Simplifies the process of having long ass docker files and cron jobs Ptero has a built in implementation for cron jobs as well
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
I love my long ass docker files though
Torrent
Torrent2mo ago
Of course you do🤣 No shame in it But a pretty UI and easy to use are huge pluses I have my ptero and wings instances running behind Cloudflare zero trust. Very secure Oh and guess what They’re both running in docker
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
What's the cloudflare zero trust?
Torrent
Torrent2mo ago
Tunnels 0 open ports required Cloudflare handles SSL
Torrent
Torrent2mo ago
Indeed:moderator: ProgamingDK helped me set it up with his docker compose script
𝒟𝑜𝓂𝒾𝓃𝒾𝒸
Personally I use crontab to sync to my smb server Works great
SmoothDomeMalone
SmoothDomeMaloneOP2mo ago
I think that's the conclusion
𝒟𝑜𝓂𝒾𝓃𝒾𝒸
Mm Rsync could also work

Did you find this page helpful?