[Question][PGAgent][Jobs] - Problems running sh scripts on remote Server
| От | João Gaspar |
|---|---|
| Тема | [Question][PGAgent][Jobs] - Problems running sh scripts on remote Server |
| Дата | |
| Msg-id | CAM+zXj31wph0BgUgRPQ3JWVq77gSF0--Km3bg_1Tb6NDX-kEaQ@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: [Question][PGAgent][Jobs] - Problems running sh scripts on remote Server
|
| Список | pgsql-admin |
https://stackoverflow.com/questions/52168081/systemd-unit-for-pgagent
My job is a sh script that makes the daily backups. I test the script and run as expected on a remote server but when configure the job in PgAdmin Win10 Client using in the Code box /pathtoscript/script.sh isn´t working when I click on Run Now.
I try to put:
sh /pathtoscript/script.sh - Don't do anything to the folder of backups
/pathtoscript/script.sh - Don't do anything to the folder of backups
Checking the /var/log/pgagent_13.log I see that pgagent establish the connection and Execute the job:
Wed Feb 3 10:04:00 2021 DEBUG: Creating DB connection: user=postgres hostaddr=127.0.0.1 port=5432 dbname=postgres
Wed Feb 3 10:04:00 2021 DEBUG: Parsing connection information...
Wed Feb 3 10:04:00 2021 DEBUG: Allocating new connection for the database with connection string: user=postgres dbname=postgres hostaddr=127.0.0.1 port=5432...
Wed Feb 3 10:04:00 2021 DEBUG: Starting job: 1
Wed Feb 3 10:04:00 2021 DEBUG: Executing batch step1(part of job 1)
Wed Feb 3 10:04:00 2021 DEBUG: Creating primary connection
Wed Feb 3 10:04:00 2021 DEBUG: Parsing connection information...
Wed Feb 3 10:04:00 2021 DEBUG: user: postgres
Wed Feb 3 10:04:00 2021 DEBUG: dbname: postgres
Wed Feb 3 10:04:00 2021 DEBUG: hostaddr: 127.0.0.1
Wed Feb 3 10:04:00 2021 DEBUG: port: 5432
Wed Feb 3 10:04:00 2021 DEBUG: Creating DB connection: user=postgres hostaddr=127.0.0.1 port=5432 dbname=postgres
Wed Feb 3 10:04:00 2021 DEBUG: Database sanity check
Wed Feb 3 10:04:00 2021 DEBUG: Clearing zombies
Wed Feb 3 10:04:00 2021 DEBUG: Checking for jobs to run
Wed Feb 3 10:04:00 2021 DEBUG: Sleeping...
My question this can be a read/write permissions on destination folder to the user pgagent?
Thank you for your time and I'm sorry if I'm asking a silly question.
В списке pgsql-admin по дате отправления: