Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of relative paths inconsistent with restic #409

Open
paladincorners opened this issue Nov 9, 2024 · 1 comment
Open

Handling of relative paths inconsistent with restic #409

paladincorners opened this issue Nov 9, 2024 · 1 comment

Comments

@paladincorners
Copy link

paladincorners commented Nov 9, 2024

Describe the bug
In autorestic, all relative paths are converted to their absolute paths prior to being passed to restic for backup. However, restic itself is able to handle relative paths (at least newer versions can).

When a relative path is passed to restic directly (without autorestic), although the snapshot "Paths" attribute (visible with restic snapshots) has the absolute path, the files inside each snapshot are stored as just the relative path (visible with restic ls latest).

However, if a relative path is passed to autorestic, the full absolute path is stored (restic ls latest).

Proposed solution: if a relative path is setup in the autorestic config file, pass the relative path, not absolute path, to restic.

Expected behavior
Passing a relative path to autorestic should pass that relative path to restic, not resolve it to an absolute path.

Environment

  • OS: Mac & Linux
  • Version: 1.8.3

Additional context

@notDavid
Copy link

Hi there,

so my current backup method on macOS with restic is to:

  1. create an apfs snapshot of the disk
  2. mount this into ~/Volumes/restic_snapshot/
  3. change the cwd to this snapshot folder with cd $HOME/Volumes/restic_snapshot
  4. then create a backup with restic backup ./
    which then saves the relative path (that is, it correctly omits the ~/Volumes/restic_snapshot/ part of the path.)

Do i understand correctly, there is no way (or workaround) to achieve this with autorestic currently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants