Restore Alfresco Database (PostgreSQL)

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

Restore Alfresco Database (PostgreSQL)

Jump to solution

Hi all,

 Due to a server crash, I have to restore the whole Alfresco Community (ver 5.2). I am trying to follow the guide in https://community.alfresco.com/thread/202783-backup-and-restore-procedures , but get stuck at recovery of Postgres database, since I cannot login with 'postgres' account (mine PostgreSQL is running on Centos 7). Which is the default password of 'postgres' user? anyone who knows, please help me. I am much appreciated!

Tien

1 Solution

Accepted Solutions
Highlighted
Established Member II

Re: Restore Alfresco Database (PostgreSQL)

Jump to solution

Try this with root privileges:

Enter with postgres user

su - postgres

Go to the directory

cd /opt/alfresco-community/postgresql/bin/

Run bin

./psql

Insert the password (usually on the alfresco-global-properties)

> YOUR_SQL_COMMAND

>\q

Exit from postgres user

exit

If you want just do a dump then

su - postgres

cd /opt/alfresco-community/postgresql/bin/

./pg_dump -h 127.0.0.1 -U alfresco -W alfresco > /opt/alfresco/alfresco52dump.sql

for restore

./psql -h 127.0.0.1 -U alfresco -W alfresco < /opt/alfresco/alfresco52dump.sql

View solution in original post

3 Replies
Highlighted
Established Member II

Re: Restore Alfresco Database (PostgreSQL)

Jump to solution

Try this with root privileges:

Enter with postgres user

su - postgres

Go to the directory

cd /opt/alfresco-community/postgresql/bin/

Run bin

./psql

Insert the password (usually on the alfresco-global-properties)

> YOUR_SQL_COMMAND

>\q

Exit from postgres user

exit

If you want just do a dump then

su - postgres

cd /opt/alfresco-community/postgresql/bin/

./pg_dump -h 127.0.0.1 -U alfresco -W alfresco > /opt/alfresco/alfresco52dump.sql

for restore

./psql -h 127.0.0.1 -U alfresco -W alfresco < /opt/alfresco/alfresco52dump.sql

View solution in original post

Highlighted
Active Member

Re: Restore Alfresco Database (PostgreSQL)

Jump to solution

Thanks a lot. It works fantastically!

Highlighted
Established Member II

Re: Restore Alfresco Database (PostgreSQL)

Jump to solution

Mark as Corrected Answer then