Skip to content

Commit 80a74b3

Browse files
committed
RESOLVED #32 regression, always transferring full snapshots
UPDATED readme, version
1 parent 8e54abc commit 80a74b3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

btrfs_sxbackup/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Software Foundation; either version 2 of the License, or (at your option)
66
# any later version.
77

8-
__version__ = '0.6.8'
8+
__version__ = '0.6.9'
99
__author__ = 'Marco Schindler'
1010
__email__ = '[email protected]'
1111
__maintainer__ = '[email protected]'

btrfs_sxbackup/core.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,9 @@ def run(self):
966966
# btrfs send command/subprocess
967967
source_parent_path = None
968968
if len(self.source.snapshots) > 0:
969+
# Indicates if an incremental snapshot can/should be performed
970+
incremental = False
971+
969972
# Latest source and destination snapshot timestamp has to match for incremental transfer
970973
if self.destination is not None:
971974
if len(self.destination.snapshots) > 0:
@@ -974,10 +977,16 @@ def run(self):
974977
('Latest timestamps of source [%s] and destination [%s] do not match. A full snapshot will '
975978
'be transferred')
976979
% (self.source.snapshots[0].name.timestamp, self.destination.snapshots[0].name.timestamp))
980+
else:
981+
incremental = True
977982
else:
978983
_logger.warn('Destination has no snapshots, a full snapshot will be transferred')
979984

980985
else:
986+
incremental = True
987+
988+
# Set source parent path in case incremental transfer is applicable
989+
if incremental:
981990
source_parent_path = os.path.join(self.source.container_subvolume_path,
982991
str(self.source.snapshots[0].name))
983992

0 commit comments

Comments
 (0)