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 (opens new window)
# Protected Properties
Property | Description |
---|---|
backupPath | string (opens new window), null (opens new window) – The path to the database backup |
# backupPath
- Type
- string (opens new window), null (opens new window)
- Default value
null
The path to the database backup
View source (opens new window)
# Protected Methods
Method | Description |
---|---|
backup() | Attempts to backup the database. |
restore() | Attempts to restore the database after a migration failure. |
# backup()
Attempts to backup the database.
View source (opens new window)
Arguments
$flag
(boolean (opens new window), null (opens new window)) – The user’s indication of whether they want the DB to be backed up
Returns
# restore()
- Since
- 4.4.15
Attempts to restore the database after a migration failure.
View source (opens new window)