Skip to content

Ignore Cloud files which are not synced locally #3697

@fkusche

Description

@fkusche

Output of restic version

restic 0.13.0 compiled with go1.18 on linux/amd64

What should restic do differently? Which functionality do you think we should add?

I am using the cloud every now and then, and when I am backing up my Windows machine, I get the following error if the file is not present locally:

{'during': 'archival',
'error': {'Err': 381,
'Op': 'read',
'Path': '\\\\?\\GLOBALROOT\\Device\\HarddiskVolumeShadowCopy11\\Users\\flo\\OneDrive\\Bilder\\xyz.jpg'},
'item': 'c:\\Users\\flo\\OneDrive\\Bilder\\xyz.jpg',
'message_type': 'error'}

Err 381 seems to be ERROR_CLOUD_FILE_READ_ONLY_VOLUME. As you can see, I am using VSS, so this error makes sense. Windows can not download and store this file on a shadow copy. I would go so far and say, Windows (triggered by restic) should never download those files - even if backing up without shadow copy.

Therefore I propose the following:

  • Never try to backup files that are not locally present.
    I guess, at the moment, restic will trigger a download of all files which are not locally available during backup (if not using VSS).
    I think this is wrong behavior. A backup program should not make such large modifications to the state of the system being backed up.
  • Maybe add a switch like --force-download-cloud-files which will activate this behavior explicitly,
    as of course there might be people that want to backup their cloud files, too. (Maybe even myself, but it should be done explicitly.)
  • Abort with an error message if this switch and vss are used together.

What are you trying to do? What problem would this solve?

Backing up cloud synced directories without errors.

Did restic help you today? Did it make you happy in any way?

It helps me everyday since months!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions