backup related scripts added

parent 65079437
#!/bin/bash
# This script is to be run in a remote machine with access to pre
DUMPFILE=/home/ubuntu/backup/`date +%d`-mysqldump.sql.gz
ssh pre "nice mysqldump -u root -p'r00...Tt' pictodb | gzip > $DUMPFILE"
scp pre:$DUMPFILE /home/amontejo/backup
#!/bin/bash -
# export PATH=/bin is required for cut, date, grep
# export PATH=/usr/bin is required for AWS Command Line Interface tools
export PATH=/bin:/usr/bin:/home/ubuntu/.local/bin
# AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY needed for AWS CLI tools
export AWS_ACCESS_KEY_ID=AKIAJJZNE3V5QMKSMU6A
export AWS_SECRET_ACCESS_KEY=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
# AWS_CONFIG_FILE required for AWS Command Line Interface tools (f.e. ".aws")
export AWS_CONFIG_FILE=/root/.aws/config
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment