bw2io.backup
#
Module Contents#
Functions#
Backup data directory to a |
|
|
Backup project data directory to a |
Restore a backed up project data directory from a |
- bw2io.backup.backup_data_directory()[source]#
Backup data directory to a
.tar.gz
(compressed tar archive) in the user’s home directory. Restoration is done manually.Examples
>>> bw2io.bw2setup() >>> bw2io.backup.backup_data_directory() Creating backup archive - this could take a few minutes...
- bw2io.backup.backup_project_directory(project)[source]#
Backup project data directory to a
.tar.gz
(compressed tar archive) in the user’s home directory.- Parameters
project (str) – Name of the project to backup.
- Returns
project_name – Name of the project that was backed up.
- Return type
str
- Raises
ValueError – If the project does not exist.
See also
bw2io.backup.restore_project_directory
To restore a project directory from a backup.
- bw2io.backup.restore_project_directory(fp)[source]#
Restore a backed up project data directory from a
.tar.gz
(compressed tar archive) in the user’s home directory.- Parameters
fp (str) – File path of the project to restore.
- Returns
project_name – Name of the project that was restored.
- Return type
str
- Raises
ValueError – If the project does not exist.
See also
bw2io.backup.backup_project_directory
To restore a project directory from a backup.