The snapshot format, as documented in the github wiki, doesn’t seem to match the current behavior. For example, here’s a simple backup I made of a folder with a single file called “test”, with contents “asdf”.
Is there more up-to-date documentation somewhere? Or can someone at least tell me where to start looking in the source code?
My efforts to reverse-engineer it are below:
Firstly, there’s no mention of compression-- but I figured out that LZ4 prefix pretty easily. The json output is then:
{
"chunks": [
"5fc6d07e4150163ce5085a61560807f8dbbd3a352323dfcad1756ecf43a9f275"
],
"end_time": 1717355775,
"file_size": 4,
"files": [
"0d55bb119c0420a3382697baf86169cb5aface7e5e8e9d9a296b8f6ab6584929"
],
"id": "test-src",
"lengths": [
"bdec3d2844cf0e87ac57b681be6d96e016691b93962fae6ebfbd14ae0a7a92e7"
],
"number_of_files": 1,
"options": "-hash",
"revision": 1,
"start_time": 1717355775,
"tag": "",
"version": 1
}
Firstly, a few of the fields aren’t mentioned.
The chunk file appears to be a list of numbers. In this case it’s [4]
? Which is the size of the file in bytes, but maybe it’s a coincidence.
The files 0d55...
and bdec...
don’t exist in the repo.
There are two other files: 877f649...
which appears to be the file contents, and 47428...
which appears to not be json, but I see the name of the file in there… and a ref to b913...
which I don’t see anywhere either.
My .duplicacy/preferences
file is:
[
{
"name": "default",
"id": "test-src",
"repository": "",
"storage": "REDACTED\\test-src\\..\\dest\\",
"encrypted": false,
"no_backup": false,
"no_restore": false,
"no_save_password": false,
"nobackup_file": "",
"keys": null,
"filters": "",
"exclude_by_attribute": false
}
]
And the repo config is:
{
"compression-level": 100,
"average-chunk-size": 4194304,
"max-chunk-size": 16777216,
"min-chunk-size": 1048576,
"fixed-nesting": true,
"DataShards": 0,
"ParityShards": 0,
"chunk-seed": "6475706c6963616379",
"hash-key": "6475706c6963616379",
"id-key": "6475706c6963616379",
"chunk-key": "",
"file-key": "",
"rsa-public-key": ""
}