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

Backup to OneDrive or Google Drive #1166

Closed
KC-T opened this issue Jun 7, 2021 · 8 comments
Closed

Backup to OneDrive or Google Drive #1166

KC-T opened this issue Jun 7, 2021 · 8 comments
Assignees
Milestone

Comments

@KC-T
Copy link

KC-T commented Jun 7, 2021

Is it possible to back up to OneDrive or Google Drive? I have tried Rclone and Insync. Backintime cannot recognise the drives mapped by them.

@emtiu emtiu added Feature requests a new feature Low relevant, but not urgent labels Sep 15, 2022
@buhtz
Copy link
Member

buhtz commented Mar 16, 2023

Please correct me if I'm wrong but rsync is not intended to work like this.

You have to mount your one/google/xyz drive to your locale filesystem. You can do this automatically via one of BITs user-callbacks.

I see no way to offer a solution implemented to BIT and vote for close.

@buhtz buhtz added Discussion decision or consensus needed Feedback needs user response, may be closed after timeout without a response labels Mar 16, 2023
@buhtz buhtz self-assigned this Mar 16, 2023
@emtiu
Copy link
Member

emtiu commented Mar 16, 2023

Many people use these cloud storage services, so it makes sense that users would like to use them as a backup storage destination.

But the approach of BackInTime and rsync is more like: We can write to any destination that is a locally mounted filesystem, or reachable by SSH.

Neither is natively supported by OneDrive or Google Drive, and so I agree that this is out of scope for BackInTime (and would probably be a lot of hassle to maintain if implemented).

@buhtz
Copy link
Member

buhtz commented May 30, 2023

Dear @KC-T ,
can you give us some feedback about the issue please.

I have tried Rclone and Insync. Backintime cannot recognise the drives mapped by them.

That sounds interesting. What do you mean by "mapped"?
You use BIT on GNU/Linux, right? Drives/Volumes are mounted somewhere else in the filesystem (usually under /mnt/* or /media/*). Where does "mapped" Google/OneDrive "drives" do appear in the filesystem? Or how do you see them in your system? Maybe you can add a snapshot?

EDIT:
I found this about rclone. I'm not sure if I get it right but the OneDrive is not mapped to Linux. Rclone somewho connects to onedrive. The mounting then is done to the rclone-backup-entity (like a snapshot or backup image file). There is no direct connection between OneDrive and the filesystem. There is rclone in between. It looks like an ugly workaround.

In addition to emtiu's arguments I would say this is definitive nothing some of us would invest time in. Please ask Microsoft/Google to implement a native linux client so that their drives can be mounted to the filesystem.

@KC-T
Copy link
Author

KC-T commented May 30, 2023

My question was raised in June 2021.
OneDrive or Google Drive could not be mounted on Linux. I used Rclone and Insync to provide mapped folders (Microsoft Windows' term), but BackInTime could not recognise or back up to those folders. I did wish to use BackIntime to regularly back up to OneDrive or Google Drive. The BackInTime way is better than other incremental ways offered by other backup apps.

The final solution that I have adopted is to purchase Linux NAS and backup to there.

@aryoda
Copy link
Contributor

aryoda commented Jun 18, 2023

Did you try the onedrive tool to connect to MS One Drive?

I am just wondering how a mapped folder would work with BiT since on Windows the folder contains local copies of the files that are then synced with the MS One Drive cloud.

So: May this lead to full backup into the sync folder only without any guarantee that the backup is really transferred into the cloud?

@aryoda
Copy link
Contributor

aryoda commented Jun 19, 2023

I have done some investigations on MS OneDrive and I am quite sure now that we cannot directly support this (or similar) APIs because:

  1. The API is web-based (REST-API) and not support by rsync (which is the working horse used by BiT):
    https://learn.microsoft.com/en-us/graph/onedrive-concept-overview
    https://stackoverflow.com/questions/33756108/how-can-i-use-rsync-to-retrieve-files-from-an-http-url

  2. Mounting OneDrive with rclone (a FOSS solution for Linux since Microsoft does not provide any client to support OneDrive on Linux) does only provide a remote access to OneDrive via the REST API (either to directly the "remote" files in the cloud or by syncing it with a local folder).
    This means using the the rclone sync folder as BiT backup target folder

    • would waste a lot of disk space on your local storage (because it keeps the backup history)
    • does not guarantee to have a backup in the cloud since the syncing (via rclone) may fail anyhow

    So using a local sync folder is not recommended IMHO.

  3. "Any files you delete with rclone will end up in the trash. Microsoft doesn't provide an API to permanently delete files, nor to empty the trash, so you will have to do that with one of Microsoft's apps or via the OneDrive website."
    https://rclone.org/onedrive/

I propose

  • to add an entry in our BiT FAQ section to clarify this
  • close this issue after a cool-down period (if no new facts are brought up that would allow to support cloud storage via rsync)

I am really sorry for that but we cannot circumvent the technical preconditions of rsync!

@Germar
Copy link
Member

Germar commented Jun 19, 2023

Even with native support for mounting a cloud-storrage, most times it won't work because of limited support for 'special' fileaccess which is used by BiT. For example I tried to use Box.net with BiT couple years ago. It wasn't possible because Box.net does not support neither hardlinks nor atime. Both are mandatory for BiT.

@aryoda
Copy link
Contributor

aryoda commented Jun 19, 2023

THX Germar, this does explain why @KC-T reported

I have tried Rclone and Insync. Backintime cannot recognise the drives mapped by them.

To be added to our FAQ too...

Update 20.12.2023: I am working on the FAQ entry now...

@buhtz buhtz added Documentation and removed Feature requests a new feature Discussion decision or consensus needed Feedback needs user response, may be closed after timeout without a response Low relevant, but not urgent labels Jun 21, 2023
@buhtz buhtz assigned aryoda and unassigned buhtz Jun 21, 2023
aryoda added a commit to aryoda/backintime that referenced this issue Dec 22, 2023
…it-team#1587

- Corrects some other typos in code comments
- Add global locking details to dev doc of control files usage
@aryoda aryoda closed this as completed in 1b9e3b3 Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants