borg create --exclude '*.tmp' /backup/repo::'{hostname}-{now}' /home/user

Category: Backup & Restore

borg create --exclude '*.tmp' /backup/repo::'{hostname}-{now}' /home/user

Back up /home/user excluding temp files

Skips files matching the --exclude glob pattern, here *.tmp, so scratch files never enter the archive. Patterns are shell-style globs; use --exclude-from to load them from a file. Verify the result with borg list on the new archive.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.