blob: 1359d3de8309a1380a884c0f4597d92a29d9e0fa [file] [log] [blame]
Instrumental12f7f462018-04-23 15:43:47 -05001# BEGIN Store prev
2BD=/opt/app/osaaf/backup
3if [ -e "$BD/6day" ]; then
4 rm -Rf $BD/6day
5fi
6
7PREV=$BD/6day
8for 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"
13done
14
15if [ -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
21fi
22
23mkdir $BD/today
24
25# END Store prev
26date
27docker exec -t aaf_cass bash -c "mkdir -p /opt/app/cass_backup"
28docker 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"
30docker exec -t aaf_cass bash /opt/app/cass_backup/backup.sh
31docker container cp aaf_cass:/opt/app/cass_backup/. $BD/today
32date