Three words that nobody wants to hear:

Did I backup?”

Back­ups are tedious & bor­ing, but they should be an essen­tial part of any devel­op­ers not los­ing your clients and end­ing up des­ti­tute” work­flow.

We’ve cre­at­ed a plu­g­in to help you with this workflow.

Craft Remote Back­up makes it easy to cre­ate off­site remote back­ups from the com­fort of the Craft Con­trol Pan­el. Along with a few CLI com­mands, this gives you the abil­i­ty to take reg­u­lar snap­shots of your data­base and asset vol­umes and rest assured that they are stored secure­ly offsite.

Here’s a quick overview of its fea­tures. Once it’s con­fig­ured, you can jump over to the util­ties sec­tion to see your remote back­ups as well as cre­ate new ones: 

Utilities screenshot image
Headquarters

If you’re more com­fort­able on the com­mand line, you can use the con­sole com­mands instead:

- remote-backup/database
    remote-backup/database/create
    remote-backup/database/list
    remote-backup/database/prune

- remote-backup/volume
    remote-backup/volume/create
    remote-backup/volume/list
    remote-backup/volume/prune

These can be used to auto­mate your back­ups with Cron, or Lar­avel Forge:

#!/bin/bash

# A simple script that uses remote-sync to backup
/home/forge/weareferal.com/craft remote-backup/database/create
/home/forge/weareferal.com/craft remote-backup/database/prune
/home/forge/weareferal.com/craft remote-backup/volume/create
/home/forge/weareferal.com/craft remote-backup/volume/prune

/home/forge/weareferal.com/bin/backup-craft.sh

0 0 * * * /home/forge/weareferal.com/bin/backup-craft.sh

Remote Back­up can also prune” your back­ups. This means it will make sure to only keep a cer­tain num­ber of back­ups accord­ing to your set­tings, avoid­ing the poten­tial for large data bills:

Pruning screenshot image
Built-in Marie Kondo will help keep your backups tidy

To learn a bit more about the plu­g­in check out the Github page. If you want to try it out, head over to the Plu­g­in Store page and get the tri­al installed. Any ques­tions or com­ments? Send me an email or find me on the Craft Dis­cord (@timmy).

If you made it this far, you may also like

Improving the default Craft matrix field publishing experience

Tech chat default image

Craft matrix fields can be unwieldly once you've added a number of blocks. We've created a plugin to help