Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the PostgreSQL restore message #23

Closed
douglascrp opened this issue Feb 16, 2017 · 2 comments · Fixed by #27
Closed

Fix the PostgreSQL restore message #23

douglascrp opened this issue Feb 16, 2017 · 2 comments · Fixed by #27

Comments

@douglascrp
Copy link
Collaborator

When you perform a restore using BART, after the DB restore, the user gets an informative message about how to restore the database using the dump file.
The command is printed like

$PGSQL_BINDIR/psql --host=$DBHOST -U $DBUSER -d $DBNAME -f $DBNAME.dump.gz

That command doesn't work for the dump file generated by using the --format=p

The way I do the restore is like this

gunzip -c alfresco.dump | sudo -u postgres psql --host=localhost -U alfresco -d alfresco

The message I am talking about is defined at https://github.com/toniblyx/alfresco-backup-and-recovery-tool/blob/master/src/alfresco-bart.sh#L328

@douglascrp
Copy link
Collaborator Author

douglascrp commented Feb 17, 2017

@toniblyx Hello.

I have just found that these commands seem to be simpler, and in my opinion, better to use:

pg_dump -Fc -h <DBHOST> -U <DBUSER> <DBSCHEMA> > <fileName>.sql.Fc
pg_restore -h <DBHOST> -U <DBUSER> -d <DBSCHEMA> <fileName>.sql.Fc

Let me know what you think.

@toniblyx
Copy link
Owner

the simpler the better. Let's change them.

douglascrp added a commit to douglascrp/alfresco-backup-and-recovery-tool that referenced this issue May 26, 2017
…out the destination path

Implemented the suggested changes for issue toniblyx#23 Fix the PostgreSQL restore message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants