Restic snapshot and multiple --path parameters are AND compared?


restic -r local:/srv/restic_images/ --password-file=/etc/ltr/perbackup1-2022.restic_01.pwd snapshots


ID        Time                 Host           Tags                                             Paths
99b07f31  2022-11-26 17:29:41  permain2-2020  LV,main_mnt_2022-11-26_17_29_op                  /vgmain2/main_mnt
2c5eb99e  2022-11-26 17:43:25  permain2-2020  LV,main_mnt_2022-11-26_17_43_op                  /vgmain2/main_mnt
7360361b  2022-11-26 17:44:23  permain2-2020  LV,main_mnt_2022-11-26_17_44_op                  /vgmain2/main_mnt
8527858f  2022-12-03 09:48:34  permain2-2020  LV,ltr_srvdata_hdb_2022-12-03_09_48_op           /vgmain2/srvdata_hdb
b52be547  2022-12-03 09:48:51  permain2-2020  LV,ltr_srvdata_hdb_2022-12-03_09_48_op           /vgmain2/srvdata_hdb
443d1365  2022-12-03 09:49:16  permain2-2020  LV,ltr_srvdata_hdb_2022-12-03_09_49_op           /vgmain2/srvdata_hdb
bdb99a4c  2022-12-03 09:50:21  permain2-2020  LV,ltr_srvdata_hdb_2022-12-03_09_50_op           /vgmain2/srvdata_hdb
708013cf  2022-12-03 13:23:27  permain2-2020  LV,ltr_srvwin4_c_def_WJ2022_2022-12-03_13_23_cl  /vgmain2/srvwin4_c_def_WJ2022
cf067840  2022-12-03 14:24:56  permain2-2020  LV,ltr_srvwin4_c_def_WJ2022_2022-12-03_14_24_cl  /vgmain2/srvwin4_c_def_WJ2022

and many more.

Now i want only the (latest, but that i will test later) from /vgmain2/main_mnt and /vgmain2/srvdata_hdb

If i do
restic -r local:/srv/restic_images/ --password-file=/etc/ltr/perbackup1-2022.restic_01.pwd snapshots --path /vgmain2/main_mnt --path /vgmain2/srvdata_hdb
i get no snapshot listed.

if i do --path only once i get results for each file.

Help says

      --path path        only consider snapshots for this path (can be specified multiple times)

So i would think i can get snapshots for different files at once. What i am doing wrong?


If you specify multiple paths, then the snapshot must contain ALL of them. (Yes this is inconsistent compared to tagsā€¦)

OK, thank you. I think this info should be added to help and manual.