Skip to content

Commit 978253c

Browse files
author
Carlos Gonzalez Betancort
committed
MB-31517 MB-31515 Backport fix for accumulative backups
Accumulative backups where creating full backups after the first accumulative backup. This has been fixed and now when making accumulative backups if it is the first backup it will create a full backup. The second time it will store new elements since the last full and the next time it will again store all the new elements since the last full. The differential backups will store every new element since the last backup regardless of what type of backup it is. Change-Id: If8c60902e4aa489be806910253caf5ebab6cf5a3 Reviewed-on: http://review.couchbase.org/111242 Tested-by: Carlos Gonzalez <carlos.gonzalez@couchbase.com> Reviewed-by: Patrick Varley <patrick@couchbase.com> Well-Formed: Build Bot <build@couchbase.com>
1 parent 407f3ac commit 978253c

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

pump_bfd.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,16 @@ def find_seqno(opts, spec, bucket_name, node_name, mode):
244244
snapshot_list.extend(recursive_glob(path, 'snapshot_markers.json'))
245245
seqno_list.extend(recursive_glob(path, 'seqno.json'))
246246

247-
accudir, accu_dirs = BFD.find_latest_dir(timedir, "accu")
248-
if accudir:
249-
last_backup = accudir
250-
path = BFD.construct_dir(accudir, bucket_name, node_name)
251-
if os.path.isdir(path):
252-
file_list.extend(recursive_glob(path, 'data-*.cbb'))
253-
failoverlog_list.extend(recursive_glob(path, 'failover.json'))
254-
snapshot_list.extend(recursive_glob(path, 'snapshot_markers.json'))
255-
seqno_list.extend(recursive_glob(path, 'seqno.json'))
247+
if mode.find("accu") < 0:
248+
accudir, accu_dirs = BFD.find_latest_dir(timedir, "accu")
249+
if accudir:
250+
path = BFD.construct_dir(accudir, bucket_name, node_name)
251+
last_backup = path
252+
if os.path.isdir(path):
253+
file_list.extend(recursive_glob(path, 'data-*.cbb'))
254+
failoverlog_list.extend(recursive_glob(path, 'failover.json'))
255+
snapshot_list.extend(recursive_glob(path, 'snapshot_markers.json'))
256+
seqno_list.extend(recursive_glob(path, 'seqno.json'))
256257
if mode.find("diff") >= 0:
257258
diffdir, diff_dirs = BFD.find_latest_dir(timedir, "diff")
258259
if diff_dirs:

0 commit comments

Comments
 (0)