Forum Discussion

smckelvey's avatar
smckelvey
Level 5
14 years ago

bpduplicate -hoursago , Does it pertain when backups began or finished

Does anyone know whether the bupduplicate -hoursago command refers to when backups began or finished, or both?

 

For example:

  • Backup A started 9:30AM, ended 10:30AM
  • Backup B started 10:30AM, ended 11:30AM
  • At 11:00AM i run "bpduplicate -hoursago 11:00AM

Which of the above backups, if any will be captured?

  • Everything looks at start time only - even the commands that let you specify start and endtime with -s/-d and -e are only looking at backups that _started_ between the two times.  They don't really care when the backups finished.

    BUT, you can't use -hoursago with a time - so your command example should have given you and error.  In addition, I think there are other required fields - -dstunit jumps to mind.

    Bill

  • Everything looks at start time only - even the commands that let you specify start and endtime with -s/-d and -e are only looking at backups that _started_ between the two times.  They don't really care when the backups finished.

    BUT, you can't use -hoursago with a time - so your command example should have given you and error.  In addition, I think there are other required fields - -dstunit jumps to mind.

    Bill

  • sorry bills, that was a typo. The example command should have been had a 1" appended to it.

    Anyways, thank you both; that helps. But one more question then.

    What happens if a backup began within the window specified by the bpduplicate command, but hasn't finish? Will the duplication job wait in the queue until said backup is complete and then begin duplicating?

    for example:

    • Backup A start 10:01AM, ends 11:30AM
    • at 11:00AM, I run bpduplicate -hoursago 1
  • The backup job does not get entered into whatever table is referenced until it completes.  Until then, NetBackup effectively does not know about the job (this is simplified; of course NetBackup knows about it, just not in any really useful way, for us), so the search for jobs to duplicate will come up empty.  The duplicate will not wait for active jobs to finish.

    Bill

  • the backup must begin and end within the window created or specified by the bpduplicate -hoursago command?

    So, in my first post, neither of the backups would have been duplicated, correct?

  • The backup does not have to have ended in the window specified - but it has to be completed when you run the search.  In your original example (assuming -hoursago 1), neither image would be duplicated - Backup A started more than an hour ago, and Backup B hasn't completed yet. 

  • GREAT suggestion JiHoon!

    Only problem is that bpend_notify script goes onto each individual client.

    Another option could be parent_end or session_end notify scripts on the master server.