projects
/
cumulus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add GPLv2 license conditions.
[cumulus.git]
/
scandir.cc
diff --git
a/scandir.cc
b/scandir.cc
index
f653f43
..
65151bc
100644
(file)
--- a/
scandir.cc
+++ b/
scandir.cc
@@
-189,7
+189,7
@@
int64_t dumpfile(int fd, dictionary &file_info, const string &path,
ref = ObjectReference(ObjectReference::REF_ZERO);
ref.set_range(0, bytes);
} else {
ref = ObjectReference(ObjectReference::REF_ZERO);
ref.set_range(0, bytes);
} else {
-
ObjectReference
ref = db->FindObject(block_csum, bytes);
+ ref = db->FindObject(block_csum, bytes);
}
// Store a copy of the object if one does not yet exist
}
// Store a copy of the object if one does not yet exist
@@
-228,6
+228,7
@@
int64_t dumpfile(int fd, dictionary &file_info, const string &path,
o->write(tss);
ref = o->get_ref();
db->StoreObject(ref, block_csum, bytes, block_age);
o->write(tss);
ref = o->get_ref();
db->StoreObject(ref, block_csum, bytes, block_age);
+ ref.set_range(0, bytes);
delete o;
}
delete o;
}
@@
-564,7
+565,8
@@
void usage(const char *program)
" 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"
" 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
);
}
lbs_version, program
);
}
@@
-586,6
+588,7
@@
int main(int argc, char *argv[])
{"scheme", 1, 0, 0}, // 5
{"signature-filter", 1, 0, 0}, // 6
{"intent", 1, 0, 0}, // 7
{"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},
};
{NULL, 0, 0, 0},
};
@@
-626,6
+629,9
@@
int main(int argc, char *argv[])
if (snapshot_intent <= 0)
snapshot_intent = 1;
break;
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;
default:
fprintf(stderr, "Unhandled long option!\n");
return 1;
@@
-784,6
+790,7
@@
int main(int argc, char *argv[])
fprintf(descriptor, "Date: %s\n", desc_buf);
if (backup_scheme.size() > 0)
fprintf(descriptor, "Scheme: %s\n", backup_scheme.c_str());
fprintf(descriptor, "Date: %s\n", desc_buf);
if (backup_scheme.size() > 0)
fprintf(descriptor, "Scheme: %s\n", backup_scheme.c_str());
+ fprintf(descriptor, "Backup-Intent: %g\n", snapshot_intent);
fprintf(descriptor, "Root: %s\n", backup_root.c_str());
SHA1Checksum checksum_csum;
fprintf(descriptor, "Root: %s\n", backup_root.c_str());
SHA1Checksum checksum_csum;