FileBackup 0.4.2__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {filebackup-0.4.2 → filebackup-0.4.3}/PKG-INFO +1 -1
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/Offsite.py +3 -3
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/__init__.py +1 -1
- {filebackup-0.4.2 → filebackup-0.4.3}/tests/Offsite_UnitTest.py +44 -1
- {filebackup-0.4.2 → filebackup-0.4.3}/.copier-answers.yml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/CODEOWNERS +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/ISSUE_TEMPLATE/custom.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/actions/release_impl/action.yml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/pull_request_template.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/release_sources.yaml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/workflows/CICD.yml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/workflows/CICD_impl.yml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.github/workflows/codeql.yml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.gitignore +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.pre-commit-config.yaml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/.python-version +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/BuildBinary.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/CODE_OF_CONDUCT.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/CONTRIBUTING.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/DEVELOPMENT.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/GOVERNANCE.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/LICENSE +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/MAINTAINERS.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/README.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/SECURITY.md +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/minisign_key.pub +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/pyproject.toml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/AutoGitSemVer.yaml +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/CommandLine/CommandLineArguments.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/CommandLine/EntryPoint.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/CommandLine/MirrorEntryPoint.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/CommandLine/OffsiteEntryPoint.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/CommandLine/__init__.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/FastGlacierDataStore.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/FileSystemDataStore.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/Interfaces/BulkStorageDataStore.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/Interfaces/DataStore.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/Interfaces/FileBasedDataStore.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/Interfaces/__init__.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/S3BrowserDataStore.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/SFTPDataStore.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/__init__.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/Impl/Common.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/Impl/__init__.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/Mirror.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/Snapshot.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/py.typed +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/tests/CommandLine/EntryPoint_UnitTest.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/tests/Mirror_UnitTest.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/tests/Snapshot_UnitTest.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/tests/TestHelpers.py +0 -0
- {filebackup-0.4.2 → filebackup-0.4.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: FileBackup
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Tool for creating and restoring file system backups.
|
|
5
5
|
Project-URL: Homepage, https://github.com/davidbrownell/FileBackup
|
|
6
6
|
Project-URL: Documentation, https://github.com/davidbrownell/FileBackup
|
|
@@ -864,9 +864,9 @@ def Restore(
|
|
|
864
864
|
directory_working_dir
|
|
865
865
|
)
|
|
866
866
|
|
|
867
|
-
dest_filename.
|
|
868
|
-
|
|
869
|
-
|
|
867
|
+
if not dest_filename.is_file():
|
|
868
|
+
dest_filename.parent.mkdir(parents=True, exist_ok=True)
|
|
869
|
+
os.symlink(fullpath, dest_filename)
|
|
870
870
|
|
|
871
871
|
# Read the instructions
|
|
872
872
|
with (directory_working_dir / INDEX_FILENAME).open() as f:
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
# Note that this value will be overwritten by calls to `python ../../Build.py update_version` based
|
|
10
10
|
# on changes observed in the git repository. The default value below will be used until the value
|
|
11
11
|
# here is explicitly updated by the Continuous Integration system as part of a commit.
|
|
12
|
-
__version__ = "0.4.
|
|
12
|
+
__version__ = "0.4.3"
|
|
@@ -1111,6 +1111,49 @@ class TestRestore(object):
|
|
|
1111
1111
|
sep=os.path.sep,
|
|
1112
1112
|
)
|
|
1113
1113
|
|
|
1114
|
+
# ----------------------------------------------------------------------
|
|
1115
|
+
@pytest.mark.parametrize("is_local_filesystem", [True, False])
|
|
1116
|
+
@pytest.mark.parametrize("encryption_password", [None, str(uuid.uuid4())])
|
|
1117
|
+
@pytest.mark.parametrize("compress", [False, True])
|
|
1118
|
+
def test_RestoreMultipleBackupsSameFile(
|
|
1119
|
+
self, _working_dir, tmp_path_factory, compress, encryption_password, is_local_filesystem
|
|
1120
|
+
):
|
|
1121
|
+
with _YieldInitializedBackupHelper(
|
|
1122
|
+
tmp_path_factory, _working_dir, compress, encryption_password
|
|
1123
|
+
) as backup_helper:
|
|
1124
|
+
restore_helper = _RestoreHelper.Create(
|
|
1125
|
+
_working_dir,
|
|
1126
|
+
tmp_path_factory,
|
|
1127
|
+
encryption_password,
|
|
1128
|
+
is_local_filesystem,
|
|
1129
|
+
backup_helper.backup_name,
|
|
1130
|
+
backup_helper.output_dir,
|
|
1131
|
+
)
|
|
1132
|
+
|
|
1133
|
+
# Read the contents of a file. We will remove this file, create a backup, and then
|
|
1134
|
+
# restore the same file.
|
|
1135
|
+
file_under_test = _working_dir / "one" / "A"
|
|
1136
|
+
assert file_under_test.is_file(), file_under_test
|
|
1137
|
+
|
|
1138
|
+
file_under_test_contents = file_under_test.read_text(encoding="utf-8")
|
|
1139
|
+
|
|
1140
|
+
backup_file_under_test = restore_helper.backup_dir / "one" / "A"
|
|
1141
|
+
|
|
1142
|
+
# Remove the file
|
|
1143
|
+
file_under_test.unlink()
|
|
1144
|
+
|
|
1145
|
+
backup_helper.ExecuteBackup(_working_dir, compress, encryption_password)
|
|
1146
|
+
|
|
1147
|
+
# Write the file
|
|
1148
|
+
file_under_test.write_text(file_under_test_contents, encoding="utf-8")
|
|
1149
|
+
|
|
1150
|
+
backup_helper.ExecuteBackup(_working_dir, compress, encryption_password)
|
|
1151
|
+
|
|
1152
|
+
# Restore the backup
|
|
1153
|
+
restore_helper.ExecuteRestore(10)
|
|
1154
|
+
|
|
1155
|
+
assert Path(restore_helper.output_dir / "one" / "A").is_file()
|
|
1156
|
+
|
|
1114
1157
|
|
|
1115
1158
|
# ----------------------------------------------------------------------
|
|
1116
1159
|
class TestRestoreErrors:
|
|
@@ -1487,7 +1530,7 @@ class _RestoreHelper(object):
|
|
|
1487
1530
|
|
|
1488
1531
|
output = cast(str, next(dm_and_content))
|
|
1489
1532
|
|
|
1490
|
-
assert dm.result == expected_result
|
|
1533
|
+
assert dm.result == expected_result, output
|
|
1491
1534
|
|
|
1492
1535
|
if expected_num_files is not None:
|
|
1493
1536
|
TestHelpers.CompareFileSystemSourceAndDestination(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/Interfaces/BulkStorageDataStore.py
RENAMED
|
File without changes
|
|
File without changes
|
{filebackup-0.4.2 → filebackup-0.4.3}/src/FileBackup/DataStore/Interfaces/FileBasedDataStore.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|