Add logic for deploying simple backup app
This commit is contained in:
parent
86429d4f06
commit
2a6b25215f
4 changed files with 121 additions and 0 deletions
18
rattail_fabric/deploy/backup/backup-everything.mako
Executable file
18
rattail_fabric/deploy/backup/backup-everything.mako
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
if [ "$1" = "-v" -o "$1" = "--verbose" ]; then
|
||||
VERBOSE='--verbose'
|
||||
PROGRESS='--progress'
|
||||
CONFIG='app/rattail.conf'
|
||||
else
|
||||
VERBOSE=
|
||||
PROGRESS=
|
||||
CONFIG='app/silent.conf'
|
||||
fi
|
||||
|
||||
|
||||
cd /srv/envs/${envname}
|
||||
|
||||
RATTAIL="bin/rattail --config=$CONFIG $PROGRESS"
|
||||
|
||||
$RATTAIL backup
|
4
rattail_fabric/deploy/backup/crontab.mako
Normal file
4
rattail_fabric/deploy/backup/crontab.mako
Normal file
|
@ -0,0 +1,4 @@
|
|||
# -*- mode: conf; -*-
|
||||
|
||||
# backup everything of importance at ${pretty_time}
|
||||
${'' if env.server_is_live else '# '}${cron_time} * * * root /usr/local/bin/backup-everything
|
Loading…
Add table
Add a link
Reference in a new issue