One touch, complete, offsite, set-it-and-forget-it backup solution


#1

Hi there. I’ve developed this bash script that completely automates easyengine website backups and makes them available to restore with one single command on a completely separate machine.

Features:

One touch, three minute install Set it and forget it, will automatically run a backup every night and email you in case of failure Works with all easyengine site types Perfectly restores every aspect of every single easyengine website you’re hosting, from your database, to your files, and so on Stores backups both locally and remotely [on S3] Encrypts all remote backups with a 42 character passphrase Allows you to restore your backup with one single command and a maximum of three minutes of your time even from a blank machine you’ve never set up before Performs DNS checks and prompts you to activate LetsEncrypt on newly restored sites [work in progress…] Does NOT rely on easyengine’s database but rather directly scans your /var/www/ directory Performs a test restore before every backup to ensure remote backup integrity and passphrase match Returns detailed errors in case of failure to help you get your data back during a restore

I’m still actively developing it so please report back your experience with the script. Always test your backups to ensure they’re correct should you ever need to restore them.

Thank you in advance for your help improving ee-br!

Nk


#2

Thank you for sharing. Will it work with Ubuntu 14 as well? So restore is not yet working?


#3

@tyrro It’s tested on ubuntu 16 but has no limitations as to where you can install it, let me know how it works on other distros and / or versions if you test it. Restore is absolutely working, just the LetsEncrypt part is not yet ready, if you want to enable LE on a restored site simply finish running the ee-br-restore script and then run ee site update example.org --le


#4

I’ve got the red message: “Debian First Boot Setup was NOT previously run successfully OR the system was not rebooted at the end” What does it mean? Is it save to run on already configured server?


#5

I’ve just updated the script to make ee-br independent from DFBS [so that it doesn’t require it]. It’s a setup loop we run on every new machine we initiate, and we make it mandatory for all of our projects, but ee-br doesn’t actually require it, so by adding a couple of dependencies to the ones ee-br already installs, it can now be run independently of it. Delete your ee-br folder, re-clone the script, and let me know how it works.


#6

My server is running on debian jessie. For debian the following command not working (and as I understand is not required): apt-add-repository ppa:duplicity-team/ppa -y Another point: for debian I have to install composer separetely trough php (from this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-debian-8)

One more point: it is installing all packages for easyengine. Is it required for this script to have mail packages installed? I personally never use it

Ok, script is installed successfully))

Question: this script is running for all installed websites? How to configure it per site? I don’t have to backup some sites, will be good to exclude it from daily backup


#7

Ok thanks for bringing up these points, as mentioned above I hadn’t tested it with Debian yet. I’ve updated the script and created a Debian 8 VPS for this reason and tested it and it works.

1] apt-add-repository issue: fixed by using debian’s repo’s duplicity 2] composer: only installs on ubuntu now [see below]

3] The script now detects your distro and if it’s ubuntu it asks you if you want to go ahead and install all of easyengine’s stack [ee stack install --all] and composer for PhpMyAdmin. It skips this extra step on non-ubuntu distros as it’s too complex to maintain.

4] Exclusions are still a work in progress. For now you can hardcode an exclusion on ee-br-backup line 239 by adding a “&& [ ! $this_site = “yoursitename” ]” to the end of the line.

Please re-clone, re-install, and let me know how it works out for you [updating keeps your existing config file intact of course]. Thanks!


#8

Update: The restore script now also lets you activate LetsEncrypt on newly restored sites manually or automatically by performing the necessary DNS checks. @Roman_Morenetc_Romap still working on exclusions, will post back soon with those.


#9

Update: exclusion feature now added. Make sure you update your config file with the “backup_exclude_sites=” setting.


#10

Update: video! https://youtu.be/sw3FsBWHj9M


#11

it doesnot work if easyengine is setup on google cloud as GC doesnot provide root access. What can be done for the same.


#12

Interesting. What kind of access do you have on the machine? Do you have shell access? Can you act as the webserver?


#13

sorry bt i am not of much a tech guy… however u can see for yourself. just pm me


#14

Thanks would give it a try soon.


#15

Very good, let me know how it works for you!


#16

Update: v0.0.4 with interactive installer and S3 connection checker. @diamond_sharma test this out and let me know if you can get your S3 connection to work.


#17

Hey i have 2 server one on Digital ocean and 1 on Google Cloud. Now i want to move all sites from GC to DO. But DO already has EE installed with sites running. Also i dont have S3 now. Can this be done?


#18

Absolutely. Make sure to update ee-br [now known as raptor] to the latest version by re-cloning it and reinstalling it on the GC server, copy the latest timestamped produced archive from the /root/openspace42/raptor/backups/archive directory on the GC server over to the DO server, install raptor there [it don’t harm your existing sites in any way] and run the restore script from there, selecting standalone archive when prompted, and follow instructions from there.


#19

root@diamond:~# bash openspace42/raptor/raptor-backup bash: openspace42/raptor/raptor-backup: No such file or directory root@diamond:~# i am getting this error.


#20

Are you running the command manually or are you getting this during [re-]install? If you’re running the [re-]install skip running the mid-install backup when you get prompted.