Skip to main content
Formatting.
Source Link
Stephen Kitt
  • 483.2k
  • 60
  • 1.2k
  • 1.4k

As rsnapshotrsnapshot uses rsyncrsync and passes the exclude rules to it, you can specifically include directories/files by using a '+''+' (include) rule.

The first rule that applies is acted on, so simply add a line

+ /var/lib/docker/volumes/ 

ABOVE your other rule.

From the rsync documentation:

Filter Rules

...

As the list of files/directories to transfer is built, rsync checks each name to be transferred against the list of include/exclude patterns in turn, and the first matching pattern is acted on: if it is an exclude pattern, then that file is skipped; if it is an include pattern then that filename is not skipped; if no matching pattern is found, then the filename is not skipped.

As rsnapshot uses rsync and passes the exclude rules to it, you can specifically include directories/files by using a '+' (include) rule.

The first rule that applies is acted on, so simply add a line

+ /var/lib/docker/volumes/ 

ABOVE your other rule.

From the rsync documentation:

Filter Rules

...

As the list of files/directories to transfer is built, rsync checks each name to be transferred against the list of include/exclude patterns in turn, and the first matching pattern is acted on: if it is an exclude pattern, then that file is skipped; if it is an include pattern then that filename is not skipped; if no matching pattern is found, then the filename is not skipped.

As rsnapshot uses rsync and passes the exclude rules to it, you can specifically include directories/files by using a '+' (include) rule.

The first rule that applies is acted on, so simply add a line

+ /var/lib/docker/volumes/ 

ABOVE your other rule.

From the rsync documentation:

Filter Rules

...

As the list of files/directories to transfer is built, rsync checks each name to be transferred against the list of include/exclude patterns in turn, and the first matching pattern is acted on: if it is an exclude pattern, then that file is skipped; if it is an include pattern then that filename is not skipped; if no matching pattern is found, then the filename is not skipped.

Source Link

As rsnapshot uses rsync and passes the exclude rules to it, you can specifically include directories/files by using a '+' (include) rule.

The first rule that applies is acted on, so simply add a line

+ /var/lib/docker/volumes/ 

ABOVE your other rule.

From the rsync documentation:

Filter Rules

...

As the list of files/directories to transfer is built, rsync checks each name to be transferred against the list of include/exclude patterns in turn, and the first matching pattern is acted on: if it is an exclude pattern, then that file is skipped; if it is an include pattern then that filename is not skipped; if no matching pattern is found, then the filename is not skipped.