Works fine (version 2.7.2 (175ADB)), macOS
/tmp % mkdir root
/tmp % cd root
root % mkdir folder1 folder2
root % echo hi > folder1/file1
root % echo hi > folder2/file2
root % mkdir /tmp/target
root % duplicacy init test /tmp/target
/tmp/root will be backed up to /tmp/target with id test
root % duplicacy backup
Storage set to /tmp/target
No previous backup found
Indexing /tmp/root
Parsing filter file /tmp/root/.duplicacy/filters
Loaded 0 include/exclude pattern(s)
Packed folder1/file1 (3)
Packed folder2/file2 (3)
Backup for /tmp/root at revision 1 completed
root % rm -rf folder1 folder2
root % ls
root % duplicacy restore -r 1 'folder2/*'
Storage set to /tmp/target
Loaded 1 include/exclude pattern(s)
Parsing filter file /tmp/root/.duplicacy/filters
Loaded 0 include/exclude pattern(s)
Restoring /tmp/root to revision 1
Downloaded folder2/file2 (3)
Restored /tmp/root to revision 1
Total running time: 00:00:01
root % find . -regex "^\./[^.].*"
./folder2
./folder2/file2
root %
It is a good habit to enclose string in single quotes so that your shell does not try to expand. This is likely your issue here. Change
duplicacy restore -r 1 folder2/*
to
duplicacy restore -r 1 'folder2/*'
You have escaped *
with a backslash and ended up passing folder2*
to duplicacy, which is a valid pattern (star matches everything, including path separator)