Start a Conversation

Unsolved

This post is more than 5 years old

870

June 30th, 2010 02:00

Abort Postjob With Group

Hey,

I am trying to delete the files that I backed up after the backup group succeeds. I am using savepnpc for this problem. I want to be sure that when a problem occurs in the backup that files wont be erased. My res file is above;

type:           savepnpc;
precmd:         /nsr/prejob.sh;
pstcmd:         /nsr/postjob.sh;
timeout:        "24 hours";
abort precmd with group:        No;
abort pstcmd with group:        Yes;

prejob is just mailing that the group started, postjob is the script that deletes. Your opinions please, thanks.

27 Posts

June 30th, 2010 02:00

I found a way to test this and noticed that it didnt work. Even I interrupt the savegroup it still executes postjob.sh, which makes the non-backup-up files to be deleted. I need some help please, thanks...

736 Posts

June 30th, 2010 03:00

You could try using a timeout value with a time on it (e.g. timeout: "12:00pm";).  If it is not interpreting the timeout
value correctly, then that might be why it is not running as you expect.  You could alter your postjob script to
grep the savegrp.log for success before proceeding but that shouldn't be necessary.

-Bobby

27 Posts

June 30th, 2010 04:00

So timeout value determines whether to run the postscript or not ?

27 Posts

June 30th, 2010 06:00

Hey, thanks for you time.

I didnt know why i have dealt with savepnpc whereas my need was just archiving

I have read the admin guide and learned that "archive request" button in configuration tab does exactly what i need. It deletes the files after backup succeeds and it also verifies. The only disadvantage is that you cant schedule that (only 24h schedule).

Good evening.

736 Posts

June 30th, 2010 06:00

No, I did a quick test and I was wrong - timeout isn't going to change this behaviour.

From what I can see, pstcmd is always going to run whether the backup is successful or not. 


Maybe someone has a better idea, but the only way I can see this working is by putting an 'if' in your
postscript that checks for backup success before going on to delete.  The timeout will only work to
decide at what time to run the pstcmd even if the backup is still running.  From the Command Reference Guide:
"The post-processing commands are run after the save of the last save set or the timeout condition,
whichever comes first".

-Bobby

No Events found!

Top