Need a Minecraft server? BeastNode offers the highest performance servers with DDoS protection!

Shop for plans now

How to Use a BeastNode VPS to Backup Your Minecraft Server

This guide will explain the basic steps for you to create your own backup VPS (running on CentOS 6 64-bit) for your BeastNode Minecraft server as well as how to automate the process.

First, make sure your Minecraft server and VPS is activated and that your Minecraft server is OFFLINE. Having your Minecraft server offline when running this type of backup will ensure that your backup data won't be incomplete/corrupt when it is downloaded to the backup server.
Ensure that your VPS has CentOS 6 64-bit installed.

Now login to your Multicraft control panel for your Minecraft server to obtain your FTP login information by going to then going to the Files > FTP File Access page. Once you have that information, you can now work on the VPS side of things.

1. Login to your VPS via SSH by following this guide:

2. Once logged in, install the following:
yum install wget rsync -y

3. Now navigate to your desired backup location. We'll be using /backups in this example:
mkdir /backups
cd /backups

4. Now, fill in the following code with your FTP information from your BeastNode Minecraft server (the "-X /plugins/dynmap" part tells it to ignore that directory as Dynmap files will take extremely long to download to a point where the backup may never finish in a reasonable amount of time - if you don't have Dynmap, this part of the code is still fine to use)
wget -X /plugins/dynmap -r ftp://USERNAME:PASSWORD@FTP_IP_HERE

Note: If your username contains an email, replace the @ symbol with %40 in the username part of the script as follows for example:
wget -X /plugins/dynmap -r

5. Create a test directory and navigate to it:
mkdir test
cd test

6. Now test that completed wget command you created in step 4 by pasting it and hitting enter. The download of all your server files should start. If it does, you can either let it complete or cancel it by pressing ctrl+c

At this point, you are basically done and can create folders for each time you run this backup script manually. If you wish to automate it, you can continue on!

Automating the Backup Process

We'll be using a cron job to automate the above backup process so that you don't have to always check on it. Please do keep an eye on your disk space usage on the VPS though and keep in mind that running a backup like this while your server is online could result in a bit of lag and may also result in incomplete backup data (since it might download data while your Minecraft server is updating it).

1. Create the backup script:
cd /backups

2. Once in the vi editor, hit "i" on your keyboard to enable editing and paste the following (make sure to fill in the wget code as in the previous steps above):
day=`/bin/date +"%y-%m-%d"`
mkdir /backups/$day
cd /backups/$day
/usr/bin/wget -X /plugins/dynmap -r ftp://USERNAME:PASSWORD@FTP_IP_HERE

3. Save the file and exit the editor by pressing the ESC key on your keyboard then typing the following and hit enter:

4. Make the file executable:
chmod 755

5. Open the cron job editor:
crontab -e

6. Press "i" on your keyboard and enter the following:
0 0 * * * /backups/
The above line will run the backup script every day at midnight (server time). If you want to change the day/time, you can refer to this page for more about cron format:

7. Save and exit the cron editor by hitting ESC on your keyboard then typing :x

You're all done! Now every day at midnight, your VPS will download your server files into the /backups directory. Each backup will be put into a folder named by the date (year-month-day).

At this point, it is highly recommended that you secure your SSH login on the VPS by installing a program like Fail2Ban, which blocks IPs of those who try to brute force your server:

Additional Notes:

This method can take a very long time to complete the backup if your server has a lot of data (especially if you have a plugin like Dynmap installed or a large world). As a result, it may be beneficial for you to space out your backups in time periods of more than 24 hours by changing the cron time (otherwise it might start another backup before the previous one could complete).
For example, if you want it run every 3 days at midnight, you can set your cron script as follows:
0 0 */3 * * /backups/

Was this answer helpful?

 Print this Article

Also Read

Disable Firewalld on CentOS 7

If for any reason you need to disable the firewalld service on your CentOS 7 VPS (such as to test...

Accessing your VPS Server using SFTP (Secure FTP)

There are two ways to access your VPS files - SFTP or via SSH commands. SSH commands are for more...

How to install a Starbound server on your VPS (Ubuntu)

Although this guide is for Ubuntu, these same steps may apply to other operating systems/distros....

How to Login to Your VPS

In this guide, we'll be going over how to login to your VPS via SSH terminal/console....

How to Install Apache Web Server and PHP on CentOS VPS

How to Install the Apache Web Server and PHP on CentOS VPSThis guide will explain the basics on...