• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Server Backup with Healthcheck ping

j05h

New Pleskian
Server operating system version
Ubuntu 22.04.3 LTS
Plesk version and microupdate number
Version 18.0.57 Update #5
I have set my Plesk server up to perform a daily backup and to send me an email if there is an error.

However, I would like to utilize my [redacted] account for my server backups so that I can keep better track of my backups.

Basically, I would like to add a custom bash command (curl) that it performs after the daily backup.. maybe even one before it starts too? [redacted] would then show me how long the backup takes and notify me if the server backup did not start at all-- being emailed if there is an error only works assuming the backup started to begin with!

Is there a way to add custom commands to scheduled backups?
 
Last edited by a moderator:
In the GUI there is no option to run software before or after a backup. But you could easily create a three-line script in Linux that first executes your command that shall be run before a backup, then runs the backup, then runs the command that shall run after the backup. You can also get a return code from the backup process on the command line interface. Please see the documentation here: pleskbackup: Backing Up Content and Configuration
 
In the GUI there is no option to run software before or after a backup. But you could easily create a three-line script in Linux that first executes your command that shall be run before a backup, then runs the backup, then runs the command that shall run after the backup. You can also get a return code from the backup process on the command line interface. Please see the documentation here: pleskbackup: Backing Up Content and Configuration

I like the way you're thinking!

That works great, up to the point of the "Maximum number of full backup files to store (including both scheduled and manual backups)" setting. I don't see where that comes in to play using the backup command via the command line? I have successfully got it to perform a backup, but it's not deleting files according to that setting-- or do I need to manage the backups manually if going this route?
 
Since a few releases Plesk tags backups and makes a difference between scheduled and manual backups. A cron backup would be considered manual. These will not influence the rotation of the scheduled backups, but they will still rotate, just affecting the manual backups. The scheduled backups will continue rotating, too, but they will only take the scheduled backups into account for rotation, not the "manual" backups done through cron.
 
Since a few releases Plesk tags backups and makes a difference between scheduled and manual backups. A cron backup would be considered manual. These will not influence the rotation of the scheduled backups, but they will still rotate, just affecting the manual backups. The scheduled backups will continue rotating, too, but they will only take the scheduled backups into account for rotation, not the "manual" backups done through cron.
That makes sense.

Thank you!
 
Since a few releases Plesk tags backups and makes a difference between scheduled and manual backups. A cron backup would be considered manual. These will not influence the rotation of the scheduled backups, but they will still rotate, just affecting the manual backups. The scheduled backups will continue rotating, too, but they will only take the scheduled backups into account for rotation, not the "manual" backups done through cron.
So I've had this going for a while now, but it is not rotating as expected. I just had to manually delete at least a month and a half's worth of backups in my AWS account.. when the backup setting is only set for a maximum of 5 (days).
 
Back
Top