etiennerached / godaddy-backup-script

Automatically Backup GoDaddy Files and Databases
Mozilla Public License 2.0
19 stars 14 forks source link

Various updates including restore script #2

Closed andrewparlane closed 6 years ago

andrewparlane commented 6 years ago

There's quite a few changes here. The main things of interest are:

The config is now in config.sh not in the backup.sh script. The database access is done using a .cnf file, which means we don't have to pass the password over the command line, which isn't secure. The .cnf files and config.sh get backed up too, so that when you go to restore the backup you have the original config data. Added a restore.sh script, which lets you restore a previously created backup (it needs to have been created using the updated backup.sh script that copies the config.sh and the .cnf files to the backup. It will not work with backups generated before these changes). The restore script offers the user the chance to use the backed up DB credentials or enter them manually, meaning you can have a read only use in the .cnf and then use a different user which has write permissions for the restore. Bunch of echos to stdout / stderr. You can use both scripts with > /dev/null to see just the error messages, or leave off the > /dev/null to see all the output (which is quite short).

I've tested this a bunch with my setup and with a test setup, but I can't guarantee I've not missed something. It is recommended that the restore script with your setup before you need to use it.

andrewparlane commented 6 years ago

ping

andrewparlane commented 6 years ago

cool, thanks.

On 15 January 2018 at 04:02, Etienne Rached notifications@github.com wrote:

Merged #2 https://github.com/etiennerached/godaddy-backup-script/pull/2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/etiennerached/godaddy-backup-script/pull/2#event-1423821741, or mute the thread https://github.com/notifications/unsubscribe-auth/AE51Onz_-8wI5UTYnFG1Em-kQfLaHswpks5tKwYYgaJpZM4RCq9s .