Skip to main content

Confirming backups have completed

Comments

6 comments

  • arjanvr
    It is sending an email when done. Or at least with me
    0
  • nathanics
    It does send me an email, but I need a bash script to confirm the backup has finished before it moves on.
    0
  • 24x7server
    Hello, I think there is simple way to run your won backup scripts after the cPanel backup scripts. For this you will have to create /scripts/postcpbackup scripts and enable this backup hook through WHM "Development "Manage Hooks so that your /scripts/postcpbackup script will be run automatically when your cpanel backup is completed.
    0
  • cPanelMichael
    Hello :) You could use an event hook to run a script at the completion of the backup process: Guide to Standardized Hooks You can register a hook after creating the script with a command such as:
    /usr/local/cpanel/bin/manage_hooks add script /root/post_backup --category System --event Backup --stage post
    Thank you.
    0
  • nathanics
    In my case the script i'm creating will actually be ran from a remote server so it cannot be called directly by the post backup hook. But with that information i can write the post_backup script to touch a file and monitor that file from my remote script and i think that will get me where I need to be. Just one follow up question, is there any condition where we fail to create a successful backup but the post backup script still gets triggered? Thanks for all the info/help -Nathan
    0
  • cPanelMichael
    ]Just one follow up question, is there any condition where we fail to create a successful backup but the post backup script still gets triggered?

    The hook should happen after the backup process completes, regardless of if an account backup fails to generate. It's rare that a backup generation fails, so it's something that should be addressed to determine why it happens. Thank you.
    0

Please sign in to leave a comment.