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" ...
                    • Alternative for Full Backup - Trimmed backup

                      Applicable till 8.1 version (Till 8121 builds) Nowadays the database size is huge in various users instance. It is because the indexing related files, archived files, file attachments are folder are huge in size. Due to which either our application ...
                    • AD Sync issue_Rootpath failure

                      Error trace: 09:48:46:989]|[10-31-2019]|[com.adventnet.servicedesk.asset.util.WorkStationDiscoverUtil]|[INFO]|[62064]: Log message from WMI task : mwc-dc-01 - LDAP Search : Root Path Failure. (0x8007052e)| ...