Absolute path for sequencer.sh needed for automatic execution via cron
This commit is contained in:
@@ -137,7 +137,7 @@ step_20_alias() { ALIAS="backupdb"; }
|
||||
step_20() {
|
||||
local LASTYEAR=$(($(date +%Y)-1))
|
||||
if [ ! -s ~/.pgpass ] ; then
|
||||
echo "[INFO] For unattended backup please define ~/.pgpass containing credentials for user mayan"
|
||||
echo " [I] For unattended backup please define ~/.pgpass containing credentials for user mayan"
|
||||
fi
|
||||
echo "Backup custom pg format with standard user / database: mayan / mayan"
|
||||
exep "pg_dump -h 127.0.0.1 -U mayan -Fc mayan | bzip2 -c > ${toolDbBackupFolder}/`date +%Y-%m-%d\"_\"%H-%M-%S`.backup.bz2"
|
||||
@@ -149,6 +149,7 @@ toolDbBackupFolder=${toolMediaFolder}/backupdb
|
||||
step_22_info() { echo "Postgres database restore"; }
|
||||
step_22_alias() { ALIAS="restoredb"; }
|
||||
step_22() {
|
||||
echo " [I] Postgres database restore procedure"
|
||||
echo "1. Create a empty postgres database first (step 4)"
|
||||
echo "2. psql -h <host> -U <database user> -d <database name> -W -f <sql dump file>"
|
||||
echo " e.g. psql -h 127.0.0.1 -U mayan -d mayan -W -f 2018-06-07_18-10-56.sql"
|
||||
@@ -190,4 +191,4 @@ toolScript() {
|
||||
}
|
||||
|
||||
VERSION_SEQREV=8
|
||||
. sequencer.sh
|
||||
. /usr/local/bin/sequencer.sh
|
||||
|
Reference in New Issue
Block a user