\BackupTask
Synopsis
class BackupTask
extends BuildTask
{
- // members
- protected string $title = 'SilverStripe Backup task';
- protected string $description = 'Creates a backup.';
- protected boolean $enabled = true;
- public static string $BACKUP_FILE_TYPE = 'tgz';
- public static string $BACKUP_MIME = 'application/tgz';
- public static string $BACKUP_GET_URL = 'backuper/get-backup';
- public static array $REQUIRED_COMMANDS = ;
- // methods
- public void run()
- public string createBackup()
- public static string getBackupFilename()
- public static string getDatabaseName()
- public static string getBackupFileURI()
- public static string getBackupDir()
- public static string getBackupStatusFileURI()
- public static string getBackupOutputFileURI()
- public static array|int areCommandsMissing()
- private static bool isCommandExisting()
- public static string getBackupDownloadLink()
- public static string errorMsg()
- public static string successMsg()
- public static bool isBackupFilenameValid()
Hierarchy
Extends
- BuildTask
Members
protected
- $description
- $enabled
- $title
public
- $BACKUP_FILE_TYPE
- $BACKUP_GET_URL
- $BACKUP_MIME
- $REQUIRED_COMMANDS
Methods
private
- isCommandExisting() — Checks if the given command is missing in the system
public
- areCommandsMissing() — Checks if the commands in the array given are missing in the system
- createBackup() — Gets a dump of the database and archives it together with the assets by using the ssPak tool.
- errorMsg() — Returns a error message, which will be shown in the interface
- getBackupDir() — Return the path to the backup directory
- getBackupDownloadLink() — Returns a download link to the backup file
- getBackupFileURI() — Returns a URI path pointing to the backup file
- getBackupFilename() — Returns a valid filename of a backup based on a timestamp
- getBackupOutputFileURI() — Return the path to the backup task's STDOUT file
- getBackupStatusFileURI() — Return the path to the backup status file
- getDatabaseName() — Get the project's database name
- isBackupFilenameValid() — Check if the given backup filename is valid
- run()
- successMsg() — Returns a success message, which will be shown in the interface