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
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
A plugin with cloud sync
There's a good one
Any suggestions?
It will not lead to corruption
Use cronjobs
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.
No reason to do that whatsoever
Also
Use tar.gz
Yeah that's what I use
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?
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
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 featureI'll ask the obvious: and restored from them without issue?
Yep
And migrated giant backups of my entire system to new dedicated servers
No issue
Or data loss
I would assume Ptero is communicating with the server no?
Cool
Just feel like I should double check
Ptero doesn’t, wings is what manages the containers
Ptero is just the panel interface
But yeah, essentially
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
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 testedI
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?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
I love my long ass docker files though
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
What's the cloudflare zero trust?
Tunnels
0 open ports required
Cloudflare handles SSL
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
I think that's the conclusion
Mm
Rsync could also work