title: Actions eleventyNavigation: key: 🎬 Actions
An action in borgmatic is like a subcommand in Borg. The create action creates
a backup, the list action shows the files in an archive, and so on.
If you omit create and other actions from the command-line, borgmatic runs
through a set of default actions:
prune any old backups as per the configured retention policycompact segments to free up space (with Borg 1.2+ and borgmatic 1.5.23+)create a backupcheck backups for consistency problems due to things like file damagePrior to version 1.7.9 The
default action ordering was prune, compact, create, and check.
If you want to disable this default action behavior and require explicit actions to be specified, add the following to your configuration:
default_actions: false
With this setting, running borgmatic without arguments will show the help
message instead of performing any actions.
If you find yourself wanting to customize the actions, you have some options.
First, you can run borgmatic's create, prune, compact, or check
actions separately. For instance, the following optional actions are
available (among others):
borgmatic create
borgmatic prune
borgmatic compact
borgmatic check
You can run borgmatic with only one of these actions provided, or you can mix
and match any number of them in a single borgmatic run. This supports
approaches like skipping certain actions while running others. For instance,
this skips prune and compact and only runs create and check:
borgmatic create check
New in version 1.7.9 borgmatic now respects your specified command-line action order, running actions in the order you specify. In previous versions, borgmatic ran your specified actions in a fixed ordering regardless of the order they appeared on the command-line.
But instead of running actions together, another option is to run backups with
create on a frequent schedule (e.g. with borgmatic create called from one
cron job), while only running expensive consistency checks with check on a
much less frequent basis (e.g. with borgmatic check called from a separate
cron job).
New in version 1.8.5 Instead of (or in addition to) specifying actions on the command-line, you can configure borgmatic to skip particular actions.
New in version 1.8.5 You can
configure borgmatic to skip running certain actions (default or otherwise).
For instance, to always skip the compact action (e.g., when using Borg's
append-only
mode),
set the skip_actions option in your configuration:
skip_actions:
- compact