Restore Alfresco Database (PostgreSQL)

cancel
Showing results for 
Search instead for 
Did you mean: 
ddtien66
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
4535992
Senior Member

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
4535992
Senior Member

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

ddtien66
Active Member

Re: Restore Alfresco Database (PostgreSQL)

Jump to solution

Thanks a lot. It works fantastically!

4535992
Senior Member

Re: Restore Alfresco Database (PostgreSQL)

Jump to solution

Mark as Corrected Answer then