File: rollback

package info (click to toggle)
python-lamson 1.0pre11-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 3,508 kB
  • ctags: 1,036
  • sloc: python: 5,772; xml: 177; makefile: 19
file content (16 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
source deploy/env/$1
source deploy/lib/migrate

assert_env
setup
stop $TARGET

TS=`date +%F.%T`

mv $TARGET $FAILS/$TS
logger_info "Failure was placed in $TS, if the backup fails go there."

rollback 0B $BACKUP $TARGET

logger_info "Rollback complete and failure placed in $TS"
logger_warn "System is now stopped, you should fix it."