Add logic for installing luigi service as part of backup app
This commit is contained in:
parent
477af6c6a0
commit
067c02e965
6 changed files with 212 additions and 1 deletions
28
rattail_fabric2/deploy/backup/overnight-backups.sh.mako
Executable file
28
rattail_fabric2/deploy/backup/overnight-backups.sh.mako
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
${'#'}###############################################################################
|
||||
#
|
||||
# overnight "backups" automation
|
||||
#
|
||||
${'#'}###############################################################################
|
||||
|
||||
set -e
|
||||
|
||||
DATE=$1
|
||||
|
||||
if [ "$1" = "--verbose" ]; then
|
||||
DATE=$2
|
||||
VERBOSE='--verbose'
|
||||
else
|
||||
VERBOSE=
|
||||
fi
|
||||
|
||||
if [ "$DATE" = "" ]; then
|
||||
DATE=`date --date='yesterday' +%Y-%m-%d`
|
||||
fi
|
||||
|
||||
LUIGI='${envpath}/bin/luigi --logging-conf-file luigi-logging.conf'
|
||||
export PYTHONPATH=${envpath}/app/
|
||||
|
||||
cd ${envpath}/app/luigi
|
||||
|
||||
$LUIGI --module luigitasks.overnight OvernightBackups --date $DATE
|
Loading…
Add table
Add a link
Reference in a new issue