Backup from onedrive to NAS: files are downloaded on laptop

I’ve started using Duplicati to backup files I share with friends on a one drive business. The backup goal is a NAS.
It works, but not good enough:
All files are now on my laptop too. Normally, I only have files on my laptop that I recently opened and/or selected as ‘always available on this laptop’ (the white circle with an arrow or the green circle with an arrow). All other files are only available in the cloud (cloud symbol).
And I don’t want all these files on my laptop. For two reasons:

  • They take too much discspace: 70GB
  • It’s not save to have all these files on a laptop that can be stolen or lost.

IF I select 'forget onedrive files that are not marked ‘permanently available’ when not opened for one day, then Duplicati starts downloading them again at the next backup. Which takes too much time and download volume.

How can I backup onedrive business files to the NAS without having them on my laptop after the backup?

Duplicati is designed to back up local data to a remote location. It doesn’t have any intelligent support for OneDrive as the source of your backups.

Duplicati is not trying to download anything from OneDrive when you do a backup. That’s a function of the OneDrive client itself. Any program that attempts to open/read a OneDrive file (whether it is Duplicati or something else) will trigger the automatic download.

Duplicati doesn’t sound like a good fit for your use case. I personally am not aware of a backup program that will let you back up your OneDrive data without downloading the data first, but I’ve not really looked into it. Maybe someone else on the forum has a suggestion.

1 Like

I don’t have one for a direct-from-OneDrive backup (I haven’t tried a web search for that though), however there might be hope of finding a backup program that will leave unmodified files in desired cloud-only way.

My guess at the issue is that Duplicati tries very hard by default to save your file metadata such as its time stamps and permissions, generically what one might call “metadata”. If attributes are in there, they change

image

image

Command Prompt attrib /? explains at least some of those:

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P | -P] [+U | -U]
       [drive:][path][filename] [/S [/D]] [/L]

  +   Sets an attribute.
  -   Clears an attribute.
  R   Read-only file attribute.
  A   Archive file attribute.
  S   System file attribute.
  H   Hidden file attribute.
  O   Offline attribute.
  I   Not content indexed file attribute.
  X   No scrub file attribute.
  V   Integrity attribute.
  P   Pinned attribute.
  U   Unpinned attribute.
  B   SMR Blob attribute.
  [drive:][path][filename]
      Specifies a file or files for attrib to process.
  /S  Processes matching files in the current folder
      and all subfolders.
  /D  Processes folders as well.
  /L  Work on the attributes of the Symbolic Link versus
      the target of the Symbolic Link

You can sort of see the action in About → Show log → Live → Verbose where it sees that the timestamp hasn’t changed, the metadata has changed, therefore it had better look the file over to scan for changes:

new: False, timestamp changed: False, size changed: False, metadatachanged: True, 9/16/2022 6:04:27 PM vs 9/16/2022 6:04:27 PM

I tried setting skip-metadata to see if that was an ugly workaround, but it got GUI and log a warning like

Metadata was reported as not changed, but still requires being added?

So basically I don’t know if Duplicati can do what you want, but some other backup program might do at least a closer-to-good-enough version of doing the backup, letting you put everything to cloud-only, then backing up changed files as you change them. For example, opening a file will force it to download, then when done it either stays around awhile or leaves when you force it off the drive. If all the moving around keeps the same time stamp, and some other program doesn’t care about attributes, it might just consider unchanged file time stamp to be good enough, and not care whether the file is on drive or only in cloud…

You don’t say what access is used, but you might be able to do a proof-of-concept using robocopy which sounds like it detects changes using timestamp. A more capable tool (but still not a full backup) is rclone.

I can’t guess at what backup programs just use timestamp, versus which ones check things like attribute.

1 Like