1 backup.class.inc public Backup::__construct($backup_name, $backup_target, array $settings)

Constructor for creating a new backup of any type.

Parameters

string $backup_name: The name for the backup. This will be used as the base name for the file, not including any extensions. Extensions are determined by the backup handler class and the values in $settings, including if compression is enabled or not.

string $backup_target: This key is very important, as it indicates the type of Backup to be performed. For example the name "db:default" will backup the primary database, and "config:active" will backup the active configuration.

array $settings: An array of additional settings to be passed to the backup instance. These will be merged with the defaults provided by the defaultSettings() method.

File

core/includes/backup/backup.class.inc, line 75
Contains the Backup base class.

Class

Backup
Base class for creating backups.

Code

public function __construct($backup_name, $backup_target, array $settings) {
  $this->backupName = $backup_name;
  $this->backupTarget = $backup_target;
  $this->settings = $settings + $this->defaultSettings();
}