Scheduled Backup failure due to permission issue in pgsql folder

Scheduled Backup failure due to permission issue in pgsql folder

Error Traces:

[com.adventnet.db.adapter.BackupRestoreUtil]|[WARNING]|[250]: pg_basebackup: could not get write-ahead log end position from server: ERROR:  could not open file "./pg_hba.conf_3may23.bkp": Permission denied|
[17:10:37:833]|[05-30-2023]|[com.adventnet.db.adapter.BackupRestoreUtil]|[WARNING]|[250]: pg_basebackup: removing data directory "/opt/managemsp/ServiceDeskPlus-MSP/backup/backup_postgres_13003_fullbackup_05_30_2023_17_10/FullBackup_20230530171001_postgres_13003_ScheduledBackup_part_1/data"|
[17:10:37:834]|[05-30-2023]|[com.adventnet.db.adapter.BackupRestoreUtil]|[INFO]|[250]: Wait For returns :: [1] Process exitValue :: [1]|
[17:10:37:837]|[05-30-2023]|[SYSERR]|[INFO]|[250]: com.adventnet.db.adapter.BackupRestoreException: B0BP09: Problem while executing command.|
[17:10:37:837]|[05-30-2023]|[SYSERR]|[INFO]|[250]: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)|
[17:10:37:837]|[05-30-2023]|[SYSERR]|[INFO]|[250]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)|
[17:10:37:837]|[05-30-2023]|[SYSERR]|[INFO]|[250]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)|
[17:10:37:837]|[05-30-2023]|[SYSERR]|[INFO]|[250]: at java.lang.Thread.run(Thread.java:748)|
[17:10:37:839]|[05-30-2023]|[com.adventnet.db.adapter.AbstractBackupHandler]|[INFO]|[250]: backupStatus :: <BackupStatus backup_id=3001 backupType="FULL_BACKUP" backup_folder="/opt/managemsp/ServiceDeskPlus-MSP/backup/backup_postgres_13003_fullbackup_05_30_2023_17_10" backup_zipname="FullBackup_20230530171001_postgres_13003_ScheduledBackup_part_1.ezip" backup_starttime="2023-05-30 17:10:01.366" backup_endtime="1970-01-01 02:59:59.999" backup_status="BACKUP_PROCESS_FAILED" dataFileCount="0" lastDataFileName="null" lastDataFileModifiedTime="-1" fileNames="null" exceptionContext="null"/>|
[17:10:37:848]|[05-30-2023]|[com.adventnet.taskengine.backup.DbBackupTask]|[INFO]|[250]: BackupStatus updated in DB :: <BackupStatus backup_id=3001 backupType="FULL_BACKUP" backup_folder="/opt/managemsp/ServiceDeskPlus-MSP/backup/backup_postgres_13003_fullbackup_05_30_2023_17_10" backup_zipname="FullBackup_20230530171001_postgres_13003_ScheduledBackup_part_1.ezip" backup_starttime="2023-05-30 17:10:01.366" backup_endtime="1970-01-01 02:59:59.999" backup_status="BACKUP_PROCESS_FAILED" dataFileCount="0" lastDataFileName="null" lastDataFileModifiedTime="-1" fileNames="null" exceptionContext="null"/>|

Solution: 

1) Run the cmd as an administrator.
2) From <Drive>:\ManageEngine\Servicedesk Plus MSP\bin execute the command initPgsql.sh.
3) Restart the application services and try scheduling the backup again.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Unable to start the application due to Pgsql privilege issue

                      ISSUE: Application does not start via both services and command prompt. ERROR TRACE: Serverout: [16:26:36:443]|[05-10-2023]|[com.adventnet.db.adapter.postgres.PostgresDBAdapter]|[SEVERE]|[27]: Exception occurred while obtaining mode of the database| ...
                    • Scheduled Backup Failure

                      Sometimes the scheduled backup fails due to the below error in the logs, Error Message org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. at ...
                    • SQL Backup permission post 10.6 Upgrade.

                      Error on the logs: [20:00:50:193]|[04-25-2022]|[com.adventnet.taskengine.backup.DbBackupTask]|[INFO]|[124]: BackupStatus updated in DB :: <BackupStatus backup_id=1806 backupType="FULL_BACKUP" ...
                    • 10.5 Linux Upgrade failure and solutions

                      Traces in logs : 1. java.lang.Exception: InitPgsqlScript exited with value :: 1 at com.adventnet.persistence.PostgresPreProcessor.executeInitPgsqlScript(PostgresPreProcessor.java:1733) 2. PGSQL Permission related errors. 3. SDP MSP installed as root ...
                    • Upgrade Failure due to the presence of CtrlZ Failure

                      This issue (SD-118352) in fixed in version 14710. Post this release, these characters are handled in the migration itself. If you are planning to migrate from version less than 14610 to 14610, then you can directly migrate to 14710, to handle this ...