Store and compare file mtimes to the nanosecond (closes #226)
check / check (push) Waiting to run
check / check (push) Waiting to run
The files table held mtime in whole seconds and the scanner compared whole seconds. A file rewritten with its size unchanged and a new mtime in the same second as the indexed one was treated as unchanged, and every later snapshot restored the old content. A new mtime_nsec column now holds the nanoseconds within the second that mtime holds, and the scanner compares the full mtime. A local index created before this change lacks the column and is rebuilt with `vaultik database delete` and a full backup. A snapshot made before it cannot be restored by this version. Model: opus-5-5
This commit was merged in pull request #257.
This commit is contained in:
+2
-1
@@ -36,7 +36,8 @@ Stores metadata about files in the filesystem being backed up.
|
||||
**Columns:**
|
||||
- `id` (TEXT PRIMARY KEY) - UUID for the file record
|
||||
- `path` (TEXT NOT NULL UNIQUE) - Absolute file path
|
||||
- `mtime` (INTEGER NOT NULL) - Modification time as Unix timestamp
|
||||
- `mtime` (INTEGER NOT NULL) - Modification time, whole seconds since the Unix epoch
|
||||
- `mtime_nsec` (INTEGER NOT NULL) - Nanoseconds within that second, 0 to 999999999
|
||||
- `size` (INTEGER NOT NULL) - File size in bytes
|
||||
- `mode` (INTEGER NOT NULL) - Unix file permissions and type
|
||||
- `uid` (INTEGER NOT NULL) - User ID of file owner
|
||||
|
||||
Reference in New Issue
Block a user