Re: How does one restore a set of files specified by wildcard
"edgar.soldin--- via Duplicity-talk" <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.duplicity.general |
|---|---|
| Message-ID | <[email protected]> |
On 29.01.2025 15:26, Jakob Bohm via Duplicity-talk wrote: > On 1/29/2025 14:27:55, edgar.soldin--- via Duplicity-talk wrote: >> hey Jakob, >> >> On 29.01.2025 10:38, Jakob Bohm via Duplicity-talk wrote: >>> Dear list, >>> >>> The documentation for Duplicity 1.x.y is quite vague on this common operation. >>> >>> How does one tell duplicity to restore a set of files specified by a wildcard such as >>> "dir1/dir2/dir3/*ken*.txt"? >>> >>> I suspect the answer involves some use of the include/exclude options, but hopefully >>> there is no need to restore the entire backup or run duplicity for each file, as both would >>> involve excessive (paid) traffic from the online storage service . >> >> fine grained selection for the restore process is not implemented unfortunately. feel free to contribute it :) >> >> all duplicity offers just now is (from https://duplicity.us/stable/duplicity.1.html#synopsis) >> >> duplicity [restore] [options] [--path-to-restore <relpath>] [--time time] source_url target_directory >> >> where <relpath> can point to a file or folder in the backup and 'target_directory' actually will be the restored file or folder. we should probably fix the man page there. >> >> tl;dr you will need to restore the full folder "dir1/dir2/dir3/" in your case if you want multiple files in it restored. >> >> sunny regards ..ede/duply.net >> > Just to clarify, dir1/dir2/dir3/ is already a relative path within the backup of > much more data, target_directory for a full restore would be a mount point of a > blank disk . duplicity will never overwrite the target. so when you want to restore to an existing mount point you will need to restore into a non-exisitng file/folder under that mount point. e.g. `/mnt/disk/restorefolder` > I was hoping the documented --include option could be used with some specific > combination of absolute and relative path syntax . > > Something like: > > # duplicity restore --include 'dir1/dir2/dir3/*ken*.txt' \ > > backend://url /original/mount/point > > Or maybe: > > # duplicity restore \ > > --include '/original/mount/point/dir1/dir2/dir3/*ken*.txt' \ > > backend://url /original/mount/point yeah that would be the intuitive way to use it, but it got never implemented unfortunately. don't know why the original author decided to use the way more inferior `--restore-path` instead. enjoy.. ede _______________________________________________ Duplicity-talk mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/duplicity-talk