Skip to content
Paul Ruane edited this page Apr 11, 2017 · 4 revisions

TMSU does not watch the filesystem for changes at this time. This is partly because this would require a daemon process to be running at all times to monitor these events andpartly because such a solution would not work on certain filesystems (such as remote filesystems).

As a result, whenever you move or alter files that have been tagged in the TMSU database, the database will be out-of-date with respect to the actual files on disk.

Status

TMSU includes a command, status, which can be used to find where the database is out of synchronicity. This command, in its simplest form (with no arguments), it will look at each file in the database and compare it with the corresponding file on disk, listing whether the file is in sync (show as T for tagged), missing (!) or modified (M).

If paths are given as arguments, the status command will look at these paths (and any files/directories beneath them) and show the status of these files. As such, files may be additionally reported as untagged (U), meaning they are on not in the database.

Repairing

TMSU is able to automatically repair files that have either been moved or modified, but not both. It can do this because when you tag files TMSU stores a number of attributes of the file, in particular its size and fingerprint: a hash of the file's contents.

Modified Files

By running repair without arguments, TMSU will be able to repair the fingerprints in the database for files that have been modified but still reside at the same path.

Moved Files

By specifying paths as arguments to repair, TMSU will (additionally to correcting fingerprints) search in these paths for any files that can no longer be found at the path when they were tagged. It will search under the specified paths for files with the same file size, and then confirm any match by comparing the file`s fingerprint with that in the database. If a match is confirmed, then TMSU will correct the path in the database.

Manual Repair

If you know for certain that files have moved from one path to another, for example if you have just moved them there, you can perform a manual repair:

$ tmsu repair --manual /some/path /new/path

This will modify all files in the database under /some/path to /new/path, and update their fingerprints.

Clone this wiki locally