cancel
Showing results for 
Search instead for 
Did you mean: 

BART restore leads to EDB startup failure

SOLVED
Level 3 Adventurer

BART restore leads to EDB startup failure

BART restore for re-initializing a master database. While my restores are successful, starting EDB post-restore is not working.  The docs only specify 2 steps (list backups, restore to target), so I’m wondering if there’s something that is missing.  The startup log also does not provide much information (I’ve run it via systemd and pg_ctl with the same output).

 

-- Subject: Unit edb-as-10.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit edb-as-10.service has begun starting up.
Jul 26 10:00:06 labedb01 edb-postmaster[13415]: 2018-07-26 10:00:06 EDT [13415]: [1-1] user=,db=,app=,client= LOG:  listening on IPv4 address "0.0.0.0", port 5444
Jul 26 10:00:06 labedb01 edb-postmaster[13415]: 2018-07-26 10:00:06 EDT [13415]: [2-1] user=,db=,app=,client= LOG:  listening on IPv6 address "::", port 5444
Jul 26 10:00:06 labedb01 edb-postmaster[13415]: 2018-07-26 10:00:06 EDT [13415]: [3-1] user=,db=,app=,client= LOG:  listening on Unix socket "/tmp/.s.PGSQL.5444"
Jul 26 10:00:06 labedb01 edb-postmaster[13415]: 2018-07-26 10:00:06 EDT [13415]: [4-1] user=,db=,app=,client= LOG:  redirecting log output to logging collector process
Jul 26 10:00:06 labedb01 edb-postmaster[13415]: 2018-07-26 10:00:06 EDT [13415]: [5-1] user=,db=,app=,client= HINT:  Future log output will appear in directory "log".
Jul 26 10:00:06 labedb01 systemd[1]: edb-as-10.service: main process exited, code=exited, status=1/FAILURE
Jul 26 10:00:06 labedb01 systemd[1]: Failed to start EDB Postgres Advanced Server 10.
-- Subject: Unit edb-as-10.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit edb-as-10.service has failed.
--
-- The result is failed.
Jul 26 10:00:06 labedb01 systemd[1]: Unit edb-as-10.service entered failed state.
Jul 26 10:00:06 labedb01 systemd[1]: edb-as-10.service failed.
Jul 26 10:00:06 labedb01 polkitd[885]: Unregistered Authentication Agent for unix-process:13403:341532 (system bus name :1.81, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnec
1 ACCEPTED SOLUTION

Accepted Solutions
Level 3 Adventurer

Re: BART restore leads to EDB startup failure

turns out it was wal files that were too old in the wal_archives.  Once that was resolved, it worked. Haven't had the issue since.

7 REPLIES
EDB Team Member

Re: BART restore leads to EDB startup failure

Hi lgwapnitsky,

 

In regards to your raised concern.

 

Could you please share the below details for further investigation :
1. BART version
2. Database logs
3. Service file

The shared details shows the OS logs for systemd.

 

Also, Note: If the backup is restored to a different database cluster directory than where the original database cluster resided, then certain operations dependent upon the database cluster location may fail if their supporting service scripts are not updated to reflect the new directory location where the backup has been restored.

 

For information about the usage and modification of service scripts, see the EDB Postgres Advanced Server Installation Guide available at: 

https://www.enterprisedb.com/resources/product-documentation

 

See the document for Advanced Server 10.

 

Scripts with Database Cluster Location for RHEL 6/CentOS 6 :

File Name : edb-as-10

Location : /etc/init.d

Description : Service script for Advanced Server 10 from interactive installer

 

Restore example :

The following example performs the RESTORE operation with the copy_wals_during_restore parameter enabled to copy the archived WAL files to the local restore_path/archived_wals directory.

-bash-4.1$ bart RESTORE -s hr -i hr_2017-03-29T13:50 -p /opt/restore_pg95 -t 1 -g

'2017-03-29 14:01:00'

INFO: restoring backup 'hr_2017-03-29T13:50' of server 'hr'

INFO: base backup restored

INFO: copying WAL file(s) to postgres@192.168.2.24:/opt/restore_pg95/archived_wals

INFO: creating recovery.conf file

INFO: archiving is disabled

INFO: permissions set on $PGDATA

INFO: restore completed successfully

 

The following is the content of the generated recovery.conf file:

restore_command = 'cp archived_wals/%f %p'

recovery_target_time = '2017-03-29 14:01:00'

recovery_target_timeline = 1

 

Hope it helps.!

Level 3 Adventurer

Re: BART restore leads to EDB startup failure

Currently rebuilding dbs due to another issue.  Will report back once I get successful backups.

EDB Team Member

Re: BART restore leads to EDB startup failure

Hi lgwapnitsky,

 

Sure. Awaiting for your reply.

Level 3 Adventurer

Re: BART restore leads to EDB startup failure

turns out it was wal files that were too old in the wal_archives.  Once that was resolved, it worked. Haven't had the issue since.

EDB Team Member

Re: BART restore leads to EDB startup failure

Hi  lgwapnitsky,

 

Thank you for the update. Please let us know if you need any other help on this.

Level 3 Adventurer

Re: BART restore leads to EDB startup failure

how did you resolve this,  how old it too old

 

I am having the issue after a restore,  postgres will not start. 

EDB Team Member

Re: BART restore leads to EDB startup failure

Hi Matt,

 

The user was having old wal files in wal_archives which was causing the issue, Could you please provide more details about the exact error which you are facing after restoration.