Thank you maintainers for such a great tool - really an upgrade from restic!
I have a use case where I want to:
- Back up only file modtimes (no ctime/atime/other attrs).
- Run a metadata diff (no content reads) between the rustic repo and local files to quickly check what files have been modified/added/removed.
However, I hit this bug where diff --no-content --metadata between the repo and local files shows a diff even though there shouldn't be.
Minimal working example on Windows:
myprofile.toml
[repository]
repository = 'C:\tmp\myprofile\repo'
password = "myprofile"
no-cache = true
[backup]
as-path = "/"
set-atime = "mtime"
set-ctime = "mtime"
set-devid = "no"
set-xattrs = "no"
ignore-ctime = true
ignore-inode = true
[[backup.snapshots]]
sources = [
'C:\tmp\myprofile\data',
]
C:\tmp>rustic -P myprofile init
[INFO] using config C:\Users\<username>\AppData\Roaming\rustic\config\myprofile.toml
[INFO] key 7a978d85 successfully added.
[INFO] repository d9c9b626 successfully created.
[INFO] using no cache
C:\tmp>rustic -P myprofile backup
[INFO] using config C:\Users\<username>\AppData\Roaming\rustic\config\myprofile.toml
[INFO] using backup sources from config file.
[INFO] repository local:C:\tmp\myprofile\repo: password is correct.
[INFO] using no cache
[INFO] using no parent
[INFO] starting to backup ["C:\\tmp\\myprofile\\data"] ...
[INFO] Files: 2 new, 0 changed, 0 unchanged
[INFO] Dirs: 1 new, 0 changed, 0 unchanged
[INFO] Added to the repo: 342 B (raw: 524 B)
[INFO] processed 2 files, 6 B
[INFO] snapshot df8cfa49 successfully saved.
[INFO] backup of C:\tmp\myprofile\data done.
C:\tmp>rustic -P myprofile diff --no-content --metadata "latest:" "local:C:/tmp/myprofile/data"
[INFO] using config C:\Users\<username>\AppData\Roaming\rustic\config\myprofile.toml
[INFO] repository local:C:\tmp\myprofile\repo: password is correct.
[INFO] comparing df8cfa49: (latest:) with local dir C:/tmp/myprofile/data (local:C:/tmp/myprofile/data)
U "bar.txt"
U "foo.txt"
Files : 0 =, 0 +, 0 -, 0 M, 2 U
Expected output where there should be no diff (with my patch):
C:\tmp>patched\rustic.exe -P myprofile diff --no-content --metadata "latest:" "local:C:/tmp/myprofile/data"
[INFO] using config C:\Users\<username>\AppData\Roaming\rustic\config\myprofile.toml
[INFO] repository local:C:\tmp\myprofile\repo: password is correct.
[INFO] comparing df8cfa49: (latest:) with local dir C:/tmp/myprofile/data (local:C:/tmp/myprofile/data)
Files : 2 =, 0 +, 0 -, 0 M, 0 U
Thank you maintainers for such a great tool - really an upgrade from restic!
I have a use case where I want to:
However, I hit this bug where
diff --no-content --metadatabetween the repo and local files shows a diff even though there shouldn't be.Minimal working example on Windows:
myprofile.tomlExpected output where there should be no diff (with my patch):