Does duplicacy pass any information about the backup to the post-script

scripting

#1

When duplicacy runs the post-backup script does it pass it any arguments? It would be super useful to say pass some information about whether the backup failed and counts of failed files and such. Worst case the path to a log file would at least make scraping that data possible.


Controlling backup behaviour when errors occur in pre/post scripts
#2

AFAIK duplicacy only logs pruning, so there’s nothing for the post-script to analize.
Second: I would very much like it that duplicacy does not call the post script (or passes a failure status) in case a failure occured.


#3

Ah, that’s disappointing. Makes it very difficult to do anything useful in response to the backup state unless you’re manually running it.


#4

I guess this is one of the reasons there are scripts for :d:


#5

Sure but is there any way to get the duplicacy web scheduler to run those scripts in preference to directly calling the duplicacy cli?


#6

i’m not sure how to get that to happen, though lets wait for multiple opinions


#7

I think we had exactly same discussion some time back :slight_smile:

Controlling backup behaviour when errors occur in pre/post scripts


#8

I knew we had one (was on phone and i was too lazy to search).

The problem is @dtownsend wants to use the web gui with his scripts, that’s why i’m not sure what advice to give.


#9

I agree we should pass something to the post-script, like whether the backup has succeeded or failed. Passing the path to the log file may not be a good idea, because at this time the log file is still being written to and the post-script may not be able to read the full content due to buffering.


#11

Which log file? Beside prune no other command creates logs right?


#12

My bad. There isn’t a log file generally available so there isn’t a way to parse the log information to post-scripts.