In this guide you will learn about the managed backups services provided by Sail Premium.
Note: Managed backups is a paid feature available only for users with an active Sail Premium subscription. If you're looking to create local backups on your computer with Sail, head over here.
Sail Premium provides a managed backups service, with automatic scheduled backups with a 60-day retention policy. These backups are stored outside of your server and can be restored to your server, or exported (downloaded) on demand.
Remote backups can also be scheduled manually with Sail CLI.
Automatic backups are enabled right after premium has been configured and enabled for your WordPress application. Automatic backups run daily at 00:00 UTC.
With Sail Premium enabled for your WordPress application, using the regular backup command will default to creating a remote backup:
sail backup create
You could also provide a description for this backup using the --description
flag:
sail backup create --description="Updating Yoast SEO"
If you wish to create a local backup to your .backups
directory, use the --local
flag like so:
sail backup create --local
If you would like to get a list of all remote backups available for your application, use:
sail backup list
The output will look something like this:
The unique timestamp for each entry can be used to get more information about the backup:
sail backup info <timestamp>
If you'd like tho download the remote backup to your computer, you'll need to export it first. Use the following command:
sail backup export <timestamp>
After the export is complete, you will be presented with the secret Export URL to download the backup. Note that anybody with this URL can download the backup so make sure you keep it safe.
Exports will expire after 48 hours.
To restore a backup to your production server, use:
sail backup restore <timestamp>
Note that this will overwrite your production application files and database. You
can use the --skip-uploads
and --skip-db
flags to skip restoring media uploads
and the database respectively.
After a successful restore, make sure you keep your local working copy in sync.
If you have any questions about backups in Sail, feel free to get in touch.