Instrumental | 12f7f46 | 2018-04-23 15:43:47 -0500 | [diff] [blame] | 1 | # BEGIN Store prev |
| 2 | BD=/opt/app/osaaf/backup |
| 3 | if [ -e "$BD/6day" ]; then |
| 4 | rm -Rf $BD/6day |
| 5 | fi |
| 6 | |
| 7 | PREV=$BD/6day |
| 8 | for D in $BD/5day $BD/4day $BD/3day $BD/2day $BD/yesterday; do |
| 9 | if [ -e "$D" ]; then |
| 10 | mv "$D" "$PREV" |
| 11 | fi |
| 12 | PREV="$D" |
| 13 | done |
| 14 | |
| 15 | if [ -e "$BD/today" ]; then |
| 16 | if [ -e "$BD/backup.log" ]; then |
| 17 | mv $BD/backup.log $BD/today |
| 18 | fi |
| 19 | gzip $BD/today/* |
| 20 | mv $BD/today $BD/yesterday |
| 21 | fi |
| 22 | |
| 23 | mkdir $BD/today |
| 24 | |
| 25 | # END Store prev |
| 26 | date |
| 27 | docker exec -t aaf_cass bash -c "mkdir -p /opt/app/cass_backup" |
| 28 | docker container cp $BD/cbackup.sh aaf_cass:/opt/app/cass_backup/backup.sh |
| 29 | # echo "login as Root, then run \nbash /opt/app/cass_backup/backup.sh" |
| 30 | docker exec -t aaf_cass bash /opt/app/cass_backup/backup.sh |
| 31 | docker container cp aaf_cass:/opt/app/cass_backup/. $BD/today |
Instrumental | e72d330 | 2018-09-17 06:46:59 -0500 | [diff] [blame] | 32 | for PRIV in cred x509; do |
| 33 | chmod 600 $BD/today/$PRIV.dat |
| 34 | done |
Instrumental | 12f7f46 | 2018-04-23 15:43:47 -0500 | [diff] [blame] | 35 | date |