Restic using rclone to backup in Onedrive

NethServer 7.7.1908


I want to use my space in Onedrive to perform cloud backups.
Is there a way to do this using rclone and restic in Nethserver?
I tried to follow instructions in rclone and restic documentations, but failed to access rest server in
I’m really not sure what I’m doing.
Appreciate any help.
Thanks a lot.


I got it working.
Created a repo in restic with “restic -r rclone:remote:foo init”
Installed rest-server following instructions in Nethserver documentation.
Edited rest-server.service:

  • user=root
  • group=root
  • exec=/usr/bin/rclone serve restic -v remote:foo --addr :8000
    Created a backup using “rest” following instructions in Nethserver documentation.
    That’s it.

From a security point of view: option to create a dedicated user for this job instead of root? (with limited permissions)

Yes, certainly a better approach. I will do that.
I think repository creation in not necessary, too.
Well, tests continues.

Would you please share, at the end of testing, a little howto on how recreate this environment?
A lots of Office365 users have 1tb of cloud space, and maybe could be a nice place for have a second or third backup copy…
And i am a user of OneDrive, which is quite empty; a cloud backup of the configuration of my setup could be a nice safevest.

1 Like


I’m still in testing, but you can get it working with this few steps:

  • create a regular user
  • change from root to created user
  • install and configure rclone:
  • return to root
  • install rest-server:
  • before “systemd daemon-reload” pass, edit /etc/systemd/system/rest-server.service: User:“created user”, Group:“created user group”, "ExecStart=/usr/bin/rclone serve restic --b2-hard-delete --drive-use-trash=false --addr -v “your remote”:“your directory if any”. There’s a lot of other options, like https, user, password etc.
  • Cockpit doesn’t have an option to create backups from rest-server. I used an example from Nethserver docs with some modifications: “db backups set t1 restic VFSType rest BackupTime ‘00 1 * * *’ CleanupOlderThan 7D Notify error NotifyTo root@localhost status enabled
    RestDirectory t1 RestHost RestPort 8000 RestProtocol http signal-event nethserver-backup-data-save t1”
  • access backup’s Cockpit page and execute t1 backup. You can’t edit it, because Cockpit doesn’t support it. If it goes wrong, see “View last log” for detais.

That’s it.


Thanks for sharing @celiofk :slight_smile:


You’re welcome.