inspect-your-backups.md 3.8 KB


title: How to inspect your backups eleventyNavigation: key: 🔎 Inspect your backups parent: How-to guides

order: 5

By default, borgmatic runs proceed silently except in the case of warnings or errors. But if you'd like to to get additional information about the progress of the backup as it proceeds, see the logging documentation for details.

Backup summary

If you're less concerned with progress during a backup, and you only want to see the summary of archive statistics at the end, use the stats option when performing a backup:

borgmatic --stats

Existing backups

borgmatic provides convenient actions for Borg's list and info functionality:

borgmatic list
borgmatic info

You can change the output format of borgmatic list by specifying your own with --format. Refer to the borg list --format documentation for available values.

New in version 1.9.0 There are also repo-list and repo-info actions for displaying repository information with Borg 2.x:

borgmatic repo-list
borgmatic repo-info

See the borgmatic command-line reference for more information.

Searching for a file

New in version 1.6.3 Let's say you've accidentally deleted a file and want to find the backup archive(s) containing it. borgmatic list provides a --find flag for exactly this purpose. For instance, if you're looking for a foo.txt:

borgmatic list --find foo.txt

This lists your archives and indicate those with files matching *foo.txt* anywhere in the archive. The --find parameter can alternatively be a Borg pattern.

To limit the archives searched, use the standard list parameters for filtering archives such as --last, --archive, --match-archives, etc. For example, to search only the last five archives:

borgmatic list --find foo.txt --last 5

Listing database dumps

If you've enabled borgmatic's database hooks, you can list backed up database dumps via borgmatic. For example:

borgmatic list --archive latest --find *borgmatic/*_databases

This gives you a listing of all database dump files contained in the latest archive, complete with file sizes.

New in borgmatic version 1.9.0Database dump files are stored at /borgmatic within a backup archive, regardless of the user who performs the backup. (Note that Borg doesn't store the leading /.)

With Borg version 1.2 and earlierDatabase dump files are stored at a path dependent on the runtime directory in use at the time the archive was created, as Borg 1.2 and earlier do not support path rewriting.

Prior to borgmatic version 1.9.0Database dump files were instead stored at ~/.borgmatic within the backup archive (where ~ was expanded to the home directory of the user who performed the backup). This applied with all versions of Borg.

Logging

By default, borgmatic only logs to the console. But to enable simultaneous syslog or file logging, see the logging documentation for details.