Using Google Drive File Stream with :d:

You cannot create folders directly in G, you must create your :d: folder (the storage) at least in G:\My Drive\.
To test this, try in explorer to create a folder directly in G: it should give you an error.

Sorry, I wasnā€™t clear. I already have a folder in my Google drive. The problem is I cannot browse to it from Duplicacy Web because I get the error I mentioned when trying to browse to the existing folder.

Since you have :d: running as a windows service, it could be that itā€™s running when youā€™re not logged in (note: i do not know if :d: works w/o user login).
Afair, GDFS only runs when a user is logged in, so it could be that :d: is trying to access that folder/drive when it doesnā€™t exist.

Are backups working while logged in?

@gchen do you have any ideas here?

Sitting at a computer now so I can give more context. Iā€™m running Duplicacy web edition on a a couple of windows computers and a Linux server. Iā€™ve got backups running with B2, Google Drive and local storage backup repositories. Backups are running without problems whether Iā€™m logged in or not.

After reading this post, I became interested in testing whether switching from the ā€œGoogle Driveā€ back end to the ā€œGoogle Drive File Streamā€ method discussed above would make sense for me. I already have all the pieces in place so I thought trying this would be relatively simple. But I donā€™t get very far.
Iā€™ve created a folder in my Google Drive where I want to store the backups. On my system this folder is at G:\My Drive\DuplicacyBackups\

But Iā€™m not getting anywhere. On the Duplicacy web interface, when I try to initialize the storage i get the earlier mentioned error.

  1. Click on ā€œStorageā€ tab
  2. Click on the ā€œFolderā€ icon to browse the local filesystem to select the local directory to be used as the storage
  3. Click on the folder for the G: drive to select a subfolder
  4. Failed to list the directory: open G:/: Access is denied.

In other words this error happens when logged in and just browsing to the directory via the web interface. I do not have any issues browsing to that folder in Windows Explorer

Thank you for the much more detailed explanation. From what youā€™re describing, I believe this is a web-ui version limitation, maybe in the way it tries to list directory contents, since G:/ is not accessible for writing.

I do have a workaround, if you want to try that (not sure if it really works, but might be worth a try).

  1. Create the same storage folder on C:/ C:\My Drive\DuplicacyBackups\ and init the storage there.
  2. Copy the contents of that folder into the Google drive folder
  3. Change the storage path in :d:'s configuration folder.

I believe by doing these steps, you work around the folder access limitation from above.

Iā€™ve tried this as per your instructions. After changing the storage path Iā€™ve created a check job and this fails when it runs.

Running check command from C:\ProgramData/.duplicacy-web/repositories/localhost/all
Options: [-log check -storagename -threads 7 -a -tabular]
2020-06-03 17:33:36.387 INFO STORAGE_SET Storage set to G:/My Drive/DuplicacyBackups
2020-06-03 17:33:36.388 ERROR STORAGE_CREATE Failed to load the file storage at G:/My Drive/DuplicacyBackups: CreateFile G:/My Drive/DuplicacyBackups: Access is denied.
Failed to load the file storage at G:/My Drive/DuplicacyBackups: CreateFile G:/My Drive/DuplicacyBackups: Access is denied.

Can you please try the check/backup using duplicacy CLI (with same repository, and/or a new one)? I want to see if that works. If we get the same access errors, then i honestly have no idea how to help you.

Hello,

I mounted a GDFS drive on OS X, added the directory through the Web Edition and started an initial backup. Itā€™s still super slow (19MB/s) and the gdfs used cache is tiny. Am I doing something wrong? Thanks!!

@MikeBrant and @bitrot

do you have any updates here, has anything changed?

Hello, I just had to be very very patient and it worked in the end!

This sounds like a very interesting way to use Duplicacy with Google Drive!

But what I am wondering about, doesnā€™t this make the backup way less secure, as any software on your PC could basically just delete files from the backup?

One of the main things a backup is supposed to protect against for example is Ransomware attacks, so malicious software that encrypts every file it can find on your PC. If your backup is a regular partition that software has write access to, then ransomware would also encrypt your Duplicacy Backup files, and then the Backup would be quite uselessā€¦

Am I missing something, or is this " Google Drive File Stream" method just way less useful as a backup? In that case, I donā€™t think itā€™s worth the potential speed improvement over directly using the Google Drive web-api.

1 Like

I have another concern with this approach: duplicacy completing backups now does not mean that the data has reached the cloud. And when will they happen ā€” is not deterministic.

I other words if my Mac burns in flames after duplicacy just completed backup I will lose data.

The ransomware concern is valid too; however google has mechanism to revert your data in bulk in these scenarios, so I would not worry much about it. User error is more of a danger ā€” and duplicacy datastore sticking in the visible drive folder is asking for trouble. That was the reason I asked to support scope for GCd and it was implemented already in a pull request but not yet merged.

The most fool proof approach would be to generate set of credentials that can only backup but not delete or modify and have duplicacy use that. This approach with B2 was discussed here recently.

3 Likes

The uploads not being necessarily done when Duplicacy finishes is not a concern, at least in my opinion. If Duplicacy was waiting for the uploads being finished, it would still be backing up during the fire. The only difference is a non-functional revision, which does not really pose a problem. Just restore the one before that. (Of course one should keep this possibility in mind, when using the storage endpoint for multiple repositories)

About moving Duplicacy to application data in Drive: I value the option for less technical people, but it makes data access vastly harder. Backupped data is still my data and I like to have the option to move it or duplicate it.

Hi, thanks for meaningful insights. I just noticed that gdfs looks quite similar to rclone mount with --vfs-cache flag. Did someone tried to use it in the way described here? Is there any significant difference in usability?