Hallo zusammen und "Anfänger"
,
so konnte ich es umsetzen die Sicherung funktioniert nun auch auf mein persönliches OneDrive.
Um OneDrive als Repository hinzufügen zu können müsst ihr in KeyHelp unter
Backup --> Neue Backup-Verwaltung --> Repository-Verwaltung --> Repository hinzufügen den Speicher-Typ "Benutzerdefiniert" auswählen.
Namen und Passwort könnt ihr auch selbst.
Ich habe in meinem OneDrive ein Verzeichnis für die Backups angelegt. Bei den Pfadangaben \ durch / ersetzen.
Im nachfolgend angezeigtem Textfeld wird die Konfiguration die ich wie folgt erhalten habe hinein kopiert.
Da ich meinen Server von einem Windows PC aus administriere habe ich mir rclone von der offiziellen Seite (
https://rclone.org/downloads/) heruntergeladen.
Das Tool funktioniert unter Windows nur richtig in einer cmd (Windows-Eingabeaufforderung).
- Aufruf um die Konfiguration zu starten (erste Auswahl n) und einen Namen vergeben "OneDrive"
Code: Select all
C:\Users\keyhelp>rclone.exe config
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> OneDrive
- Auswahl der Storage Konfiguration ONeDrive (27)
Code: Select all
Option Storage.
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
[...]
27 / Microsoft OneDrive
\ "onedrive"
[...]
Storage> 27
- Client_id und client_secret ("") leer lassen, wenn nicht benötigt
Code: Select all
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
- Die Cloud Region wählen (global=default =1)
Code: Select all
Option region.
Choose national cloud region for OneDrive.
Enter a string value. Press Enter for the default ("global").
Choose a number from below, or type in your own value.
1 / Microsoft Cloud Global
\ "global"
[...]
region> 1
- Auswahl der erweiterten Konfiguration ("") nö
Code: Select all
Edit advanced config?
y) Yes
n) No (default)
y/n> n
- Auswahl der auto Konfiguration (n) nein wählen
Code: Select all
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> n
- Eingabe des Konfigurationstoken
Code: Select all
Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
rclone authorize "onedrive"
Then paste the result.
Enter a string value. Press Enter for the default ("").
config_token>
Um den Token zu erhalten muss man sich an seinem OneDrive Account Authentifizieren, dazu ein zweites cmd öffnen und rclone wie folgt starten.
Code: Select all
C:\Users\keyhelp>rclone.exe authorize onedrive
2022/01/23 22:36:32 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=**********
2022/01/23 22:36:32 NOTICE: Log in and authorize rclone for access
2022/01/23 22:36:32 NOTICE: Waiting for code...
Sollte der Browser nicht automatisch starten bitte die URL:
http://127.0.0.1:53682/auth?state= kopieren und im Browser öffnen.
Nach erfolgreicher Autorisierung seht ihr eine Success Meldung im Browser und könnt wieder in die cmd wechseln.
- Token kopieren, der ist original viel länger
Code: Select all
2022/01/23 23:50:37 NOTICE: Got code
Paste the following into your remote machine --->
{"access_token":"EwCI=","token_type":"Bearer","refresh_token":"M.R3_BL2RrD6","expiry":"2022-01-24T00:50:37.5943565+01:00"}
<---End paste
- Token einfügen in das erste cmd
Code: Select all
Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
rclone authorize "onedrive"
Then paste the result.
Enter a string value. Press Enter for the default ("").
config_token> {"access_token":"EwCI=","token_type":"Bearer","refresh_token":"M.R3_BL2RrD6","expiry":"2022-01-24T00:50:37.5943565+01:00"}
- Auswahl des Verbindungstyps
Code: Select all
Option config_type.
Type of connection
Enter a string value. Press Enter for the default ("onedrive").
Choose a number from below, or type in an existing value.
1 / OneDrive Personal or Business
\ "onedrive"
[...]
config_type> 1
- Prüfen ob es sich um das richtige OneDrive handelt. URL einfach in einen Browser kopieren. OK? ("" = y)
Code: Select all
Drive OK?
Found drive "root" of type "personal"
URL: https://onedrive.live.com/?cid=************
y) Yes (default)
n) No
y/n>y
- Konfiguration für den benutzerdefinierten Speicher-Typ in KeyHelp wird nun angezeigt. Ohne [OneDrive]
Code: Select all
--------------------
[OneDrive]
type = onedrive
token = {"access_token":"EwCI=","token_type":"Bearer","refresh_token":"M.R3_BL2RrD6","expiry":"2022-01-24T00:50:37.5943565+01:00"}
drive_id = *********************
drive_type = personal
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>y
Hier bitte den oben beschriebenen Workaround beachten das = (ist gleich) aus dem String bei "access_token":"====" zu entfernen.