LittleGiant\SpinDB\Tasks\RotateDBTask
Synopsis
class RotateDBTask
extends BuildTask
implements
CronTask
{
- // members
- private static string $segment = 'RotateDBTask';
- protected string $title = 'Backup DB to AWS';
- protected string $description = 'Backs up DB to AWS, rotating backups over a period of time';
- // methods
- protected void message()
- public string getSchedule()
- public void process()
- protected DBBackup|null findFile()
- public void run()
- protected array buildServerBackups()
- protected DBBackup createNewBackup()
- protected void rotateBackups()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Implements
- SilverStripe\CronTask\Interfaces\CronTask
Members
private
- $segment
protected
- $description
- $title
Methods
protected
- buildServerBackups() — Ensure that a file for today's date exists, and get all server backups
- createNewBackup() — Build a new backup with the given arguments
- findFile()
- message() — Log a message
- rotateBackups() — Rotate all backups
public
- getSchedule() — Return a string for a CRON expression
- process() — When this script is supposed to run the CronTaskController will execute process().
- run() — Implement this method in the task subclass to execute via the TaskRunner