Every GridPane server features a Local backups function. You can easily enable it by for every new site added via the GridPane dashboard.
Backups are run every hour on the hour 24/7. The local backups system stores an hourly backup for the past 12 hours, a daily backup for the past 7 days, a weekly backup for the past 4 weeks and a monthly backup for the past 3 months.
But because the backups are deduplicated, this time machine style backup is incredibly efficient with space.
You can toggle them on/off in the Site Customization pop up.
Modifying the local backup schedule
Local backups for all of your websites are managed as a cronjob. If you’d like to change the frequency of your backup schedule, the information below will get you going. This is particularly useful for those of you who run large websites that take a significant amount of time to backup – WaaS sites are a popular one that struggle with hourly backups
There is a cronjob for a process called gpbup in your crontab. You can see your crontab by running this command:
The line you are looking for looks like this:
0 * * * * /usr/local/bin/gpbup
The zero and the stars correspond to times. What the above is saying is to run the command
gpbup(GridPane Backup) located in
/usr/local/bin at minute zero of every hour, of every day, of every month, of every week. This is what is setup on your servers by default.
To change the schedule, you can adjust those values. Luckily for us, some awesome soul created https://crontab.guru that will help you set your own custom schedule, and below are some examples to get you started.
Let’s say you want to change your backup schedule to twice a day. It’s best to keep it on the hour – the script likes that. Here is what we would use to change it to at the zero minutes of hours 0 and 12 (that’s 0 and 12 UTC by default, adjust for your timezone). That line would look like this:
0 0,12 * * * /usr/local/bin/gpbup
If you wanted to change the frequency to once every 4 hours you could do:
0 0,4,8,12,16,20 * * * /usr/local/bin/gpbup
This schedule would run backups at 12am, 4am, 8am, 12pm, 4pm and 8pm. The image below highlights the hourly part of the schedule.
If you wanted to change the frequency to once every 8 hours you could do:
0 0,8,16 * * * /usr/local/bin/gpbup
This schedule would run backups at 12am, 8am, and 4pm.
Editing the crontab
crontab -l only views the crontab. To edit the crontab you can run:
If you are presented with a choice, select nano as your editing tool. Then simply change the values on that line to set your schedule. Control+O will save the file (then press enter) and Control+X will close the file.
You can view the crontab again with
crontab -l to confirm the changes, and you’re now all set.
Cronjobs and Timezone
By default your servers will be on UTC time. You can confirm this by running:
If you’d like to set your cronjobs to run specific to your timezone, you can change your timezone (GP CLI coming soon).
First run the following to list available timezones:
Use your down-arrow key to navigate down until you find your timezone, and hit Control+C to exit once you’ve got it.
You can now reset your timezone with this command:
sudo timedatectl set-timezone
sudo timedatectl set-timezone Europe/Paris
sudo timedatectl set-timezone Asia/Singapore
sudo timedatectl set-timezone America/New_York
Remote backups are available as a part of our V2 backups system. You can learn more about this here:
For further information about how backup systems work, the available options for configuring them, and for setting up remote backups (available on V2), please see the articles listed below.
- V2 Backups Part 1. How Backups Work / Management / Purging / Exports and Imports
- V2 Backups Part 2. Setting Up Local Website Backups
- V2 Backups Part 3. Setting Up Remote Website Backups