05-22-2019 10:31 PM
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
05-23-2019 04:32 AM
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
05-23-2019 04:32 AM
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
05-24-2019 04:29 AM
Thanks a lot. It works fantastically!
05-24-2019 08:07 AM
Mark as Corrected Answer then
Explore our Alfresco products with the links below. Use labels to filter content by product module.