RunCloud Backup and Restore

RunCloud Backup and Restore

We recently found ourselves needing a new incremental file backup system…  something we could use to remotely store, something fast, and ultimately something reliable.

In steps Duplicity.

Duplicity allows us to sync incremental file backups to our cloud storage flawlessly; it has helped reduce backup file size, allows us to encrypt the backups, and reduce the amount of bandwidth needed for transferring both backups and restores.   Overall giving our developers a much needed break from their manual backups.

The script in our repo contains an installer that will setup everything you will need on your servers for this, though please do note that the restore is incomplete.    While we have verified manual account & app restores, we have not been able to perfect account based restores.   What this means is if your account on your server has more than 1 application in it, you will not be able to restore all of the applications in one sitting and will have to manually restore each app.

This will come in future versions of this backup/restore system, for now, enjoy:

https://gitlab.com/westernmass-hosting/other/s3backup

To install the backup/restore system simply shell into your server and clone the repo.  Once it is finished, run bash install.sh

If you already have it installed but need to update, simply do a git pull and run the installer as above.

Please keep an eye on the install, you will be prompted to configure certain necessities like your AWS S3 API credentials and the name of the bucket you will be using to store the backups.

Once installed usage is fairly simple.  To:

Backup Databases

  • s3_backup_database ALL
    • will loop through all mysql (except system specific) databases and back them up

Backup a single Database

  • s3_backup_database DATABASE_NAME
    • will backup a single database

Backup Everything

  • s3_backup ALL
    • will loop through the filesystem backing up every account and app

Backup A Single Account

  • s3_backup ACCOUNT_NAME
    • will loop through the filesystem backing up every app of a single account

Backup A Single App

  • s3_backup ACCOUNT_NAME APP_NAME
    • will backup a single app in a single account

Usage – RESTORE

Restore A Single App

  • s3_restore ACCOUNT_NAME APP_NAME
    • this will restore your accounts app to a state you select during the process
  • THIS WILL TAKE A BACKUP PRIOR TO RESTORING

Restore A Database

  • s3_restore_db DATABASE_NAME
    • this will restore your database to a state you select during the process
  • THIS WILL TAKE A BACKUP PRIOR TO RESTORING

Keep an eye on the repo for updates.

Kevin Pirnie
22 Years of PC and server maintenance & over 17 years of web development/design experience; you can rest assured that I take every measure possible to ensure your computers are running to their peak potentials. I treat them as if they were mine, and I am quite a stickler about keeping my machines up to date and optimized to run as well as they can.