Re: Restore, target syntax
Gregory Skerry via Duplicity-talk <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.duplicity.general |
|---|---|
| Message-ID | <CANDrZzh2P=eq-eR-sG_DdAnPbk0v_hG34gzsPfVw=rZ2gw7+LQ@mail.gmail.com> |
Hello,
Thanks for the clarification. Is it possible to confirm the resulting
behavior if the target directory is not 'valid'?
e.g. if the target is set using environment variables, and one is
non-existent (or points to a disconnected volume, etc)
duplicity restore --path-to-restore $RESTORE_PATH "${DUPLICITY_AWS}/${
RESTORE_DIR}" "${ENV1}/${ENV2}"
If for example above $ENV1 does not exist, it would overwrite /ENV2?
If both were invalid, it would overwrite / ?
Have made an effort trace through restore function
<https://gitlab.com/duplicity/duplicity/-/blob/main/duplicity/dup_main.py?ref_type=heads#L859>,
but can't quite follow how patchdir handles this.
Best,
Greg
On Fri, Sep 27, 2024 at 7:04 PM edgar.soldin--- via Duplicity-talk <
[email protected]> wrote:
> No,
>
> as i tried to explain via example if you give a file target will e created
> as file. give a folder it will be created as folder. there is no /into/ in
> this process.
>
> ..ede
>
> On 28.09.2024 00:54, Gregory Skerry via Duplicity-talk wrote:
> > Hello,
> > It will restore the file /into/ the target, if the target is a directory?
> >
> > Thanks.
> >
> >
> > On Fri, Sep 27, 2024 at 12:21 PM edgar.soldin--- via Duplicity-talk <
> [email protected] <mailto:[email protected]>> wrote:
> >
> > hey Gregory,
> >
> > On 27.09.2024 14:34, Gregory Skerry via Duplicity-talk wrote:
> > > Hello,
> > > Does restore take a directory or a file path as the target when
> using the --file-to-restore flag?
> >
> > `--file-to-restore` was renamed to `--path-to restore` in recent
> versions of duplicity. regardless it accepts file or folder path values and
> will restore that as the restore target.
> >
> > e.g.
> >
> > # a folder
> > duplicity restore --path-to-restore folder/folder
> file:///tmp/dupbkp/ /tmp/restore/folder
> > # a file
> > duplicity restore --path-to-restore folder/folder/file
> file:///tmp/dupbkp/ /tmp/restore/file
> >
> > sunny regards ..ede/duply.net <http://duply.net>
> >
> > _______________________________________________
> > Duplicity-talk mailing list
> > [email protected] <mailto:[email protected]>
> > https://lists.nongnu.org/mailman/listinfo/duplicity-talk <
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk>
> >
> >
> > _______________________________________________
> > Duplicity-talk mailing list
> > [email protected]
> > https://lists.nongnu.org/mailman/listinfo/duplicity-talk
>
> _______________________________________________
> Duplicity-talk mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk
>
_______________________________________________
Duplicity-talk mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk