We moved this page to our Documentation Portal. You can find the latest updates here. |
Issue
How can I change the scheduled backup start time for an Auto Backup?
Environment
OnApp Cloud 4.x/5.x
Resolution
As it is sometimes requested that these backups should all queue at the same time each day, here are some example of the MySQL queries to set the daily backups to queue at midnight, then weekly at 2am, and monthly backups to 4am:
update schedules set start_at = DATE(start_at) where period = "days"; update schedules set start_at = DATE_ADD( DATE(start_at), interval 2 hour) where period ="weeks"; update schedules set start_at = DATE_ADD( DATE( start_at), interval 4 hour) where period ="months";
Additional "where" clauses, such as 'where period= "days"' and 'target_id=23' may be used to narrow the scope as needed. Also, the date/time specified is always GMT.
Cause
Currently, backups are scheduled to start at the time of the day they were scheduled. To modify this, you need to alter the start_at field to the day and time that you would like the backup to queue next in the schedules table. In this table, the target_id depends on the target_type column if the target_type is VirtualMachine, then the target_id referenced is the virtual_machines id.
If the target_type is the disk, then the target_id referenced is the disk # that is to be backed up, where the disk # can be found on the VM's page in the UI, under "Storage."