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: str)[source]#
Backup project data directory to a
.tar.gz
(compressed tar archive) in the user’s home directory.Parameters#
- projectstr
Name of the project to backup.
Returns#
- project_namestr
Name of the project that was backed up.
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: str, project_name: Optional[str] = None, overwrite_existing: Optional[bool] = False)[source]#
Restore a backed up project data directory from a
.tar.gz
(compressed tar archive) in the user’s home directory.Parameters#
- fpstr
File path of the project to restore.
- project_namestr, optional
Name of new project to create
overwrite_existing : bool, optional
Returns#
- project_namestr
Name of the project that was restored.
Raises#
- ValueError
If the project does not exist.
See Also#
bw2io.backup.backup_project_directory: To restore a project directory from a backup.