Backup Plugin

Hello there!

Currently I’m searching for a plugin that would automatically perform a backup of my server and delete old unused backups. Ideally I’d like to keep 2 days worth of backups, with the plugin automatically creating a backup every 6 hours and deleting the oldest one. Does this exist? Thanks!

Not extremely well-versed in cron, but you can always use it to schedule file managing tasks. Someone here might be more informed, so cron - cronjob for automatic DB backup to date prefixed file - Unix & Linux Stack Exchange .

A plugin would not be necessary with that, and if you are using a minecraft hosting service they normally offer/make backups for you. Dedicated servers are a whole other beast though.

Not a plugin but a Forge mod that should do the same for you.

1 Like

I love how as soon as I click on it, the site is being migrated XD Thanks for the link though! I’ll look into it as soon as it’s done.

I use this for backups on my modded servers. I don’t have it to where it automatically deletes files, but I am pretty sure you can easily fix that. This can be run as often or as little as you want using cron jobs! (Assuming you use Linux)
#Edit bleow values
TIME=$(date +”%Y-%m-%d-%H")
#Do not edit below this unless you know what you’re doing

#Starts the backup process screen -S $SCREEN -X stuff "say Starting Backup… $(printf \r)"
 sleep 5
 screen -S $SCREEN -X stuff "save-off $(printf \r)"
 sleep 5
 screen -S $SCREEN -X stuff "save-all $(printf \r)"
 sleep 5

#Copies the level_sponge.dat for the overworld

#Copies the level.dat for the overworld

#Copies the playerdata dir

tar -cv $TEMP | gzip > $DEST/$NAME-$TIME.tar.gz
#Compresses, names, timestamps, and sends to where you want your backups

rm -r $TEMP/*
#Removes the files from their temp holding

#Ending of the saving process
 screen -S $SCREEN -X stuff "save-on $(printf \r)"
 sleep 5
 screen -S $SCREEN -X stuff "say Backup Complete! $(printf \r)"
 sleep 2

Dang Ras, you’re just giving me support left and right! At least I’m trying to bother a variety of people :stuck_out_tongue: I contacted my hosting service about it and it looks like they don’t have any easy ways to delete backups. Thanks for the tip!

Aye, I don’t do linux. Thank you though!