static const size_t LBS_METADATA_BLOCK_SIZE = 65536;
+// If true, forces a full write of metadata: will not include pointers to
+// metadata in old snapshots.
+bool flag_full_metadata = false;
+
/* TODO: Move to header file */
void add_segment(const string& segment);
item.reused = false;
item.text += encode_dict(info) + "\n";
- if (info == old_metadata) {
+ if (info == old_metadata && !flag_full_metadata) {
ObjectReference ref = ObjectReference::parse(old_metadata_loc);
if (!ref.is_null()) {
item.reused = true;
" program though which to filter descriptor\n"
" --scheme=NAME optional name for this snapshot\n"
" --intent=FLOAT intended backup type: 1=daily, 7=weekly, ...\n"
- " (defaults to \"1\")\n",
+ " (defaults to \"1\")\n"
+ " --full-metadata do not re-use metadata from previous backups\n",
lbs_version, program
);
}
{"scheme", 1, 0, 0}, // 5
{"signature-filter", 1, 0, 0}, // 6
{"intent", 1, 0, 0}, // 7
+ {"full-metadata", 0, 0, 0}, // 8
{NULL, 0, 0, 0},
};
if (snapshot_intent <= 0)
snapshot_intent = 1;
break;
+ case 8: // --full-metadata
+ flag_full_metadata = true;
+ break;
default:
fprintf(stderr, "Unhandled long option!\n");
return 1;