Script export données pour ScoDoc 9
This commit is contained in:
parent
529b01353a
commit
48d5995a2a
@ -44,12 +44,13 @@ scodocctl stop
|
||||
|
||||
echo "Dumping SQL databases..."
|
||||
chown postgres "$DEST"
|
||||
for cfgfile in "$SCODOC_VAR_DIR"/config/depts/*cfg
|
||||
for cfgfile in "$INSTANCE_DIR"/var/scodoc/config/depts/*cfg USERS
|
||||
do
|
||||
cfgfile=$(basename "$cfgfile")
|
||||
dept="${cfgfile%*.cfg}"
|
||||
db_name="SCO$dept"
|
||||
echo "$db_name"
|
||||
su -c "pg_dump --format=custom --file=\"$DEST/$db_name.dump\" \"$db_name\""
|
||||
su -c "pg_dump --format=custom --file=\"$DEST/$db_name.dump\" \"$db_name\"" postgres
|
||||
if [ ! "$?" -eq 0 ]
|
||||
then
|
||||
printf "Error dumping postgresql database\nPlease check that SQL server is running\nAborting."
|
||||
|
Loading…
Reference in New Issue
Block a user