Skip to content

BackupTrait ​

Type
Trait
Namespace
craft\console\controllers
Implemented by
craft\console\controllers\MigrateController, craft\console\controllers\UpdateController
Since
3.6.0

Updates Craft and plugins.

View source

Protected Properties ​

PropertyDescription
backupPathstring, null – The path to the database backup

backupPath ​

Type
string, null
Default value
null

The path to the database backup

View source

Protected Methods ​

MethodDescription
backup()Attempts to backup the database.

backup() ​

Attempts to backup the database.

View source

Arguments ​

  • $flag (boolean, null) – The user's indication of whether they want the DB to be backed up

Returns ​

boolean