You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
331 B
Bash
14 lines
331 B
Bash
#!/bin/bash
|
|
#
|
|
#
|
|
#
|
|
|
|
REMOTE_SYSTEM_USER=backupuser
|
|
DATABASE_SERVER_IP=$1
|
|
STAGE=$2
|
|
DATABASE_ENGINE=$3
|
|
DEST_DIR=${HOME}/backups/${STAGE}/${DATABASE_ENGINE}/
|
|
|
|
mkdir -p ${DEST_DIR}
|
|
rsync -av --remove-source-files -e "ssh -o StrictHostKeyChecking=no" ${REMOTE_SYSTEM_USER}@${DATABASE_SERVER_IP}:/backups/${DATABASE_ENGINE}/* ${DEST_DIR}/
|