cloud sync task pre and post scripts error: Pre-script failed with exit code 1

blooper98

Dabbler
Joined
Jan 18, 2019
Messages
16
Hi all,

I'm having some trouble with a cloud sync task on 11.3. For context, I'm trying to backup some nextcloud files & database with a cloud sync task. The cloud sync task fails when the instance is in use, however this can be remedied by putting the instance into maintenance mode. It seems like the cloud sync task pre and post scripts would be a good solution, execute a fairly simple command before:
Code:
#!/bin/sh
iocage exec nextcloud su -m www -c "php /usr/local/www/nextcloud/occ maintenance:mode --on"

and turn off after.

However, when I put this code in the pre-script and post-script fields the sync immediately fails and I receive the error "Pre-script failed with exit code 1" and the log indicates that it has to do with a git import error, e.g. "[Pre-script] ImportError: Bad git executable." (I'm happy to upload the full log message if it helps).

A git error seems out of place.. am I misunderstanding something about the pre and post script strings? Are they not shell scripts? The documentation seems a bit light, and I couldn't find anything searching the forums.

Thank you for your time!
 

poldi

Dabbler
Joined
Jun 7, 2019
Messages
42
Hi all,

I'm having some trouble with a cloud sync task on 11.3. For context, I'm trying to backup some nextcloud files & database with a cloud sync task. The cloud sync task fails when the instance is in use, however this can be remedied by putting the instance into maintenance mode. It seems like the cloud sync task pre and post scripts would be a good solution, execute a fairly simple command before:
Code:
#!/bin/sh
iocage exec nextcloud su -m www -c "php /usr/local/www/nextcloud/occ maintenance:mode --on"

and turn off after.

However, when I put this code in the pre-script and post-script fields the sync immediately fails and I receive the error "Pre-script failed with exit code 1" and the log indicates that it has to do with a git import error, e.g. "[Pre-script] ImportError: Bad git executable." (I'm happy to upload the full log message if it helps).

A git error seems out of place.. am I misunderstanding something about the pre and post script strings? Are they not shell scripts? The documentation seems a bit light, and I couldn't find anything searching the forums.

Thank you for your time!
Hi,
I just encountered the same issue. Did you find a solution?
Regards, Poldi
 

blooper98

Dabbler
Joined
Jan 18, 2019
Messages
16
Hi,
I just encountered the same issue. Did you find a solution?
Regards, Poldi
Sorry, I was not able to. The error code changed after I updated from 11.3-RELEASE to 11.3-U1, but it looks like I did not make a note of it. Upon updating to 11.3-U2 I now have the same rsync issue as StoreMore, who opened a thread in General Questions and Help (link), so I will have to resolve that issue before this one. Please do let me know if you find a solution.
 

poldi

Dabbler
Joined
Jun 7, 2019
Messages
42
Hi,
I just wanted to create a bug report for it as I also couldn’t find a solution. Turns out this is logged as a bug already (Here). Apparently this is earmarked for 11.3 U3. Regards, poldi
 
Top