Database and Filesystem backups are encouraged so that you can quickly get your apps back up-and-running in case of disasters.
Schedule a new backup
To schedule a backup, you must first have a Backup Provider created.
- Select the backup profile to use
- Add a label to refer to the backup as
- Set a frequency - this uses the standard cron job schema with times set to the server time; learn about cron schedule formatting
- Select Filesystem or Database depending on which you are scheduling
- If selecting Filesystem - enter the source path
- If selecting Database - select the database you are backing up
Pro tip! Space out backup run times if configuring multiple backups. If you set them to all of the same time, then they may interfere with each other.
- Destination folder is where backups will be placed (make sure the username you use has write access to the destination folder path you supply)
- Define folders and files to ignore (for Filesystem backups)
- Notifications - if you created a Notifications profile, you will have options to be notified when backups fail and/or successfully occur
If you have a backup scheduled, from the list view you can also:
- Select plus button to trigger one-off backup
- Select pause button to pause backup schedule; or select play to resume
- Select trashcan button to delete backup schedule
Clear old local backups periodically
Sometimes your server's disk space may be full because of the large old backup files. But you can set up a cron job that runs periodically in order to clear older files.
Go to Server > Cron Jobs and click Add New Cron Job and then add the following command:
find pathToBackupFiles *.tar.gz -mtime +days -type f -delete
pathToBackupFiles: is the location where your backup files are located
days: files older than the specified days are removed.
To clear files older than 30 days you need to specify 29 days since -mtime counts 24 hours period.