- Download the latest version of the download utils:
curl --remote-name-all https://gist.githubusercontent.com/JonathanWillitts/727df8d991c194f20419be4de4328c22/raw/{download_latest_db.sh,env_variables.conf}
- Edit
env_variables.conf
, and specify values for$REMOTE_USER
,$REMOTE_HOST
and$REMOTE_BACKUP_ROOT
(the path to the backup directory root, excluding the database directory name).
To download the latest backup of a database:
- Run:
bash download_latest_db.sh <replace_with_db_dir_name>
-
Script will search remote server and display latest version of specified database (if prompted, enter ssh key passphrase to allow connection) .
-
Script will download latest database backup archive it finds (if prompted, enter ssh key passphrase a second time to allow download) .