Classes | |
| class | RestoreBackupFileContent |
Functions | |
| None | _clear_configuration_directory (Path config_dir) |
| None | _extract_backup (Path config_dir, Path backup_file_path) |
| bool | restore_backup (str config_dir_path) |
| RestoreBackupFileContent|None | restore_backup_file_content (Path config_dir) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| tuple | KEEP_PATHS = ("backups",) |
| string | RESTORE_BACKUP_FILE = ".HA_RESTORE" |
Home Assistant module to handle restoring backups.
|
private |
Delete all files and directories in the config directory except for the backups directory.
Definition at line 41 of file backup_restore.py.
|
private |
Extract the backup file to the config directory.
Definition at line 57 of file backup_restore.py.
| bool homeassistant.backup_restore.restore_backup | ( | str | config_dir_path | ) |
Restore the backup file if any. Returns True if a restore backup file was found and restored, False otherwise.
Definition at line 109 of file backup_restore.py.
| RestoreBackupFileContent | None homeassistant.backup_restore.restore_backup_file_content | ( | Path | config_dir | ) |
Return the contents of the restore backup file.
Definition at line 29 of file backup_restore.py.
|
private |
Definition at line 19 of file backup_restore.py.
| tuple homeassistant.backup_restore.KEEP_PATHS = ("backups",) |
Definition at line 17 of file backup_restore.py.
| string homeassistant.backup_restore.RESTORE_BACKUP_FILE = ".HA_RESTORE" |
Definition at line 16 of file backup_restore.py.