*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Backup NAS4FREE to OneDrive

Problems, solutions, software
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
roysingh0611
NewUser
NewUser
Posts: 2
Joined: 20 Dec 2017 07:48
Status: Offline

Backup NAS4FREE to OneDrive

#1

Post by roysingh0611 » 20 Dec 2017 07:58

Hello Friends,

I was able to create a NAS system at home for my Photography files. I'm looking for a way to Schedule a full backup of the NAS to my OneDrive without the need of a PC or Laptop because I'm not always at home. Is there a Service in the NAS that can do this? All I need is a ONE-WAY backup to the OneDrive for backup purposes just in case the the NAS HDD should fail or something.

I've also enabled the FTP in the NAS and it works just fine with DDNS.

Please kindly help me cause I'm really not a programmer so I need a step-by-step guide on how we can achieve this.

Regards,
Roy

User avatar
tony1
Moderator
Moderator
Posts: 172
Joined: 14 Jul 2016 19:04
Status: Offline

Re: Backup NAS4FREE to OneDrive

#2

Post by tony1 » 20 Dec 2017 14:46

you could setup rclone to accomplish this easy enough and run it with System > Advanced > Cron a couple times a day.

roysingh0611
NewUser
NewUser
Posts: 2
Joined: 20 Dec 2017 07:48
Status: Offline

Re: Backup NAS4FREE to OneDrive

#3

Post by roysingh0611 » 20 Dec 2017 18:00

tony1 wrote:
20 Dec 2017 14:46
you could setup rclone to accomplish this easy enough and run it with System > Advanced > Cron a couple times a day.
Hi,

Could you please kindly give me a step-by-step guide on how we can do this ?

Thanks.

User avatar
tony1
Moderator
Moderator
Posts: 172
Joined: 14 Jul 2016 19:04
Status: Offline

Re: Backup NAS4FREE to OneDrive

#4

Post by tony1 » 20 Dec 2017 20:14

download the freebsd binary, https://rclone.org/downloads/ put it on a dataset or persistent directory.
follow the doc's https://rclone.org/onedrive/
then run it with cron a couple times a day. System > Advanced > Cron

Shperrung
experienced User
experienced User
Posts: 95
Joined: 04 Apr 2018 16:29
Status: Offline

Re: Backup NAS4FREE to OneDrive

#5

Post by Shperrung » 15 Oct 2018 21:26

Hi!
Despite of many time passed since asking I would share with my rclone installation. It's just installation but not an use because I don't have enough time for tests. I installed rclone into jail. I plan to use fstab to let rclone synchronize folders outside of jail. Create folders and setup linking in fstab on stopped jail.
1. Create the Jail in TheBrig and start it.
2. Connect to Xigmanas via SSH

Code: Select all

xigmanas: ~# jls
check what is the jail number we need
For example you'll see:
root@Jails:/ # 4 192.168.1.30 Jails.local /Ext/Jails
we need jail #4

Code: Select all

xigmanas: ~# jexec 4 tcsh
root@Jails:/ # pkg install
Agree with install “pkg”. Just press “y”. Then load “port tree”

Code: Select all

root@Jails:/ # portsnap fetch extract
Wait 3 minutes untill it loads something

Code: Select all

root@Jails:/ # pkg install rclone
Tra-la-la…

Code: Select all

root@Jails:/ # “Proceed with this action? [y/n]: y
You see installation process o_O
rclone is installed in Jail. Then you can configure by command

Code: Select all

root@Jails:/ # rclone config
How to setup rclone for cloud synchronization read in its supportive documentation.
11.2.0.4 - Omnius (revision 6177)
ASRock J3710-ITX, LAN: Realtek RTL8111GR; 16Gb RAM; WD 1Tbx2, WD 2Tb; UPS Powercom WOW500U.

User avatar
tony1
Moderator
Moderator
Posts: 172
Joined: 14 Jul 2016 19:04
Status: Offline

Re: Backup NAS4FREE to OneDrive

#6

Post by tony1 » 16 Oct 2018 17:09

you don't need to use a jail.
set it up at a persistent location such as a dataset and run it with cron.

Shperrung
experienced User
experienced User
Posts: 95
Joined: 04 Apr 2018 16:29
Status: Offline

Re: Backup NAS4FREE to OneDrive

#7

Post by Shperrung » 16 Oct 2018 22:24

Tried to start "rclone config" from folder on pool. Works as you wrote))
I tried to configure access to OneDrive and stopped on getting code:

Code: Select all

If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
.
How to get it if I use PUTTY?
My browser can't open this address entered manually.
11.2.0.4 - Omnius (revision 6177)
ASRock J3710-ITX, LAN: Realtek RTL8111GR; 16Gb RAM; WD 1Tbx2, WD 2Tb; UPS Powercom WOW500U.

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4921
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Backup NAS4FREE to OneDrive

#8

Post by raulfg3 » 17 Oct 2018 05:52

use http://yourNASIP:53682/auth

to gain access.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

Shperrung
experienced User
experienced User
Posts: 95
Joined: 04 Apr 2018 16:29
Status: Offline

Re: Backup NAS4FREE to OneDrive

#9

Post by Shperrung » 17 Oct 2018 07:18

Doesn't work.
I think that I need to download another rclone pack (for Win) and start rclone in parallel with config on NAS. Code obtained in Win machine is valid for NAS and address http://127.0.0.1:53682 is accessible only from local machine (not from LAN).
"Headless machine without web browser" meant in rclone documentation is our Xigmanas, i think.
11.2.0.4 - Omnius (revision 6177)
ASRock J3710-ITX, LAN: Realtek RTL8111GR; 16Gb RAM; WD 1Tbx2, WD 2Tb; UPS Powercom WOW500U.

User avatar
Snufkin
Advanced User
Advanced User
Posts: 289
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Re: Backup NAS4FREE to OneDrive

#10

Post by Snufkin » 17 Oct 2018 10:53

Shperrung wrote:
17 Oct 2018 07:18
"Headless machine without web browser" meant in rclone documentation is our Xigmanas, i think.
You are right, see Initial setup for OneDrive and Set rclone up on a headless box with no browser available
XNAS 11.3.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2, 2 x HGST HDN726040ALE614, 2 x WDC WD5000AAKS, Ippon Back Power Pro 400

Shperrung
experienced User
experienced User
Posts: 95
Joined: 04 Apr 2018 16:29
Status: Offline

Re: Backup NAS4FREE to OneDrive

#11

Post by Shperrung » 17 Oct 2018 21:33

I did it.
rclone diesn't need jails and other "crutches". It works from any folders from pool.
As I expected, installation on Xigmans needs download archives for FreeBSD and for other OS where you have an access to browser (Windows10 in my case). Initially you start configuration on NAS. When you are asked to enter "code" start rclone in cmd on Windows (or any other kind). cmd asks you same questions and automatically redirects you to cloud authorization page then it returns back and show big token. Just copy it from cmd to putty and complete registration.
The first command was

Code: Select all

xigmanas: rclone# rclone copy /mnt/Pool/Books od2:/Folder
where od2 is the name of configuration.
after coople minutes files been copied to OneDrive.
Last edited by Shperrung on 21 Oct 2018 09:38, edited 3 times in total.
11.2.0.4 - Omnius (revision 6177)
ASRock J3710-ITX, LAN: Realtek RTL8111GR; 16Gb RAM; WD 1Tbx2, WD 2Tb; UPS Powercom WOW500U.

Sreeja
NewUser
NewUser
Posts: 4
Joined: 07 Sep 2017 13:40
Status: Offline

Re: Backup NAS4FREE to OneDrive

#12

Post by Sreeja » 21 Oct 2018 01:43

thanks for sharing!

Shperrung
experienced User
experienced User
Posts: 95
Joined: 04 Apr 2018 16:29
Status: Offline

Re: Backup NAS4FREE to OneDrive

#13

Post by Shperrung » 23 Oct 2018 10:26

Unfortunately it's not simple as seems.
rclone configuration file where it keeps tokens for cloud access doesn't survive after reboot.
By default rclone creates file here

Code: Select all

/root/.config/rclone/rclone.conf
I manually copied it to my folder on pool after creation and copy back after reboot. After this it works.
Running commands like

Code: Select all

rclone --config="/share/CACHEDEV1_DATA/RCloneCache/.config/rclone/rclone.conf" config file
doesn't solve problem.
Later I'll try to apply unionfs for synchronization folders to keep configuration file despite of reboot.
11.2.0.4 - Omnius (revision 6177)
ASRock J3710-ITX, LAN: Realtek RTL8111GR; 16Gb RAM; WD 1Tbx2, WD 2Tb; UPS Powercom WOW500U.

User avatar
Snufkin
Advanced User
Advanced User
Posts: 289
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Re: Backup NAS4FREE to OneDrive

#14

Post by Snufkin » 23 Oct 2018 13:49

You wrote config option twice.
Just delete "config file" at the very end of your line.
XNAS 11.3.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2, 2 x HGST HDN726040ALE614, 2 x WDC WD5000AAKS, Ippon Back Power Pro 400

Shperrung
experienced User
experienced User
Posts: 95
Joined: 04 Apr 2018 16:29
Status: Offline

Re: Backup NAS4FREE to OneDrive

#15

Post by Shperrung » 23 Oct 2018 14:13

These are different comnsnds. 1th --config defines new location. 2nd returns result.
But actually I didn't get my working configs after this despite of shown result.

Code: Select all

xigmanas: ~# /mnt/RAID/rclone/rclone --config="/mnt/RAID/rclone/rclone.conf" config file
Configuration file is stored at:
/mnt/RAID/rclone/rclone.conf
xigmanas: ~# 
After reboot:

Code: Select all

Welcome to XigmaNAS!

xigmanas: ~# /mnt/RAID/rclone/rclone config file

Configuration file doesn't exist, but rclone will use this path:
/root/.config/rclone/rclone.conf
xigmanas: ~# 
11.2.0.4 - Omnius (revision 6177)
ASRock J3710-ITX, LAN: Realtek RTL8111GR; 16Gb RAM; WD 1Tbx2, WD 2Tb; UPS Powercom WOW500U.

User avatar
Snufkin
Advanced User
Advanced User
Posts: 289
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Re: Backup NAS4FREE to OneDrive

#16

Post by Snufkin » 23 Oct 2018 14:43

Did you issue following command?

Code: Select all

xigmanas: ~# /mnt/RAID/rclone/rclone --config="/mnt/RAID/rclone/rclone.conf" config
Enter an interactive configuration session where you can setup new remotes and manage existing ones.
See rclone config page.

There is no direct way to install extra software in embedded XigmaNAS environment.
Therefore you have to explicitly specify rclone configuration file path for every rclone call.

I'm using scripts and environment variables
  • MS Windows

    Code: Select all

    set RCLONE_CONFIG=path:to\rclone\config\file\rclone.conf
    set RCLONE_LOG_FILE=path:to\rclone\log\file\rclone.log
    path:to\rclone\binary\rclone copy local remote:
  • FreeBSD

    Code: Select all

    #!/bin/sh
    export RCLONE_CONFIG=/path/to/rclone/config/file/rclone.conf
    export RCLONE_LOG_FILE=/path/to/rclone/log/file/rclone.log
    /path/to/rclone/binary/rclone copy local remote:
XNAS 11.3.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2, 2 x HGST HDN726040ALE614, 2 x WDC WD5000AAKS, Ippon Back Power Pro 400

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 873
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: Backup NAS4FREE to OneDrive

#17

Post by crest » 23 Oct 2018 14:55

Snufkin wrote:
23 Oct 2018 14:43
Did you issue following command?

Code: Select all

xigmanas: ~# /mnt/RAID/rclone/rclone --config="/mnt/RAID/rclone/rclone.conf" config
Enter an interactive configuration session where you can setup new remotes and manage existing ones.
See rclone config page.

There is no direct way to install extra software in embedded XigmaNAS environment.
Therefore you have to explicitly specify rclone configuration file path for every rclone call.

I'm using scripts and environment variables
  • MS Windows

    Code: Select all

    set RCLONE_CONFIG=path:to\rclone\config\file\rclone.conf
    set RCLONE_LOG_FILE=path:to\rclone\log\file\rclone.log
    path:to\rclone\binary\rclone copy local remote:
  • FreeBSD

    Code: Select all

    #!/bin/sh
    export RCLONE_CONFIG=/path/to/rclone/config/file/rclone.conf
    export RCLONE_LOG_FILE=/path/to/rclone/log/file/rclone.log
    /path/to/rclone/binary/rclone copy local remote:
I'm on the way to finalize a rclone extension, originaly triggered by this -> viewtopic.php?f=56&t=12698&p=87345#p87345
which will take care about installing, upgrading and maybe backup and some other tasks which will be good for embedded systems too.
It will be ready in some days ...

Regards
crest
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

User avatar
Snufkin
Advanced User
Advanced User
Posts: 289
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Re: Backup NAS4FREE to OneDrive

#18

Post by Snufkin » 23 Oct 2018 15:26

crest wrote:
23 Oct 2018 14:55
I'm on the way to finalize a rclone extension, originaly triggered by this -> viewtopic.php?f=56&t=12698&p=87345#p87345
which will take care about installing, upgrading and maybe backup and some other tasks which will be good for embedded systems too.
It will be ready in some days ...

Regards
crest
What a great news, Crest!
I've already finished fighting with rclone and almost completed acme.sh integration (webroot mode).
Maybe I should wait a bit for Let's Encrypt extension? :roll:
XNAS 11.3.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2, 2 x HGST HDN726040ALE614, 2 x WDC WD5000AAKS, Ippon Back Power Pro 400

Shperrung
experienced User
experienced User
Posts: 95
Joined: 04 Apr 2018 16:29
Status: Offline

Re: Backup NAS4FREE to OneDrive

#19

Post by Shperrung » 23 Oct 2018 16:43

Snufkin wrote:
23 Oct 2018 14:43
Did you issue following command?

Code: Select all

xigmanas: ~# /mnt/RAID/rclone/rclone --config="/mnt/RAID/rclone/rclone.conf" config
No, I used this

Code: Select all

xigmanas: ~# /mnt/RAID/rclone/rclone --config="/mnt/RAID/rclone/rclone.conf" config file
But your version without "file" at the end realy works and may be used in command script.
Snufkin wrote:
23 Oct 2018 14:43
I'm using scripts and environment variables

[*]FreeBSD

Code: Select all

#!/bin/sh
export RCLONE_CONFIG=/path/to/rclone/config/file/rclone.conf
export RCLONE_LOG_FILE=/path/to/rclone/log/file/rclone.log
/path/to/rclone/binary/rclone copy local remote:
Can you explain how it works and where it should be pasted?

Dear crest, thank you for your work in this! It's really great news!
11.2.0.4 - Omnius (revision 6177)
ASRock J3710-ITX, LAN: Realtek RTL8111GR; 16Gb RAM; WD 1Tbx2, WD 2Tb; UPS Powercom WOW500U.

User avatar
Snufkin
Advanced User
Advanced User
Posts: 289
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

Re: Backup NAS4FREE to OneDrive

#20

Post by Snufkin » 23 Oct 2018 20:05

Shperrung wrote:
23 Oct 2018 16:43
Snufkin wrote:
23 Oct 2018 14:43
FreeBSD

Code: Select all

#!/bin/sh
export RCLONE_CONFIG=/path/to/rclone/config/file/rclone.conf
export RCLONE_LOG_FILE=/path/to/rclone/log/file/rclone.log
/path/to/rclone/binary/rclone copy local remote:
Can you explain how it works and where it should be pasted?
It works nice, because you save all rclone command line options not in your brain but just in script.
To make script with above content:
  1. choose your favorite persistent location, for example rclone directory,
  2. create empty file in this directory, for example CopyToOneDrive.sh, and make it executable,
    Shell commands:

    Code: Select all

    touch CopyToOneDrive.sh
    chmod +x CopyToOneDrive.sh
  3. call nano editor and enter above lines in script,
    • do not forget to change paths and names to what you have in your environment,
    • #!/bin/sh line is mandatory for shell scripts,
  4. then enter in script all rclone options you need to copy files to Onedrive, see RClone Config file doc chapter.
For testing purpose in local network I have script named CopyOldToNew.sh.
Ii's usefull to test various rclone options and, at the same time, copy files from old retired NAS to new one.

Code: Select all

#!/bin/sh
export RCLONE_CONFIG=/mnt/services/rclone/rclone.conf
#export RCLONE_LOG_FILE=/mnt/services/logs/rclone.log
export RCLONE_NO_UPDATE_MODTIME=true
#export RCLONE_BWLIMIT=4M
#export RCLONE_TRANSFERS=2
export RCLONE_INCLUDE='backup-*/**'
#export RCLONE_DRY_RUN=true

/mnt/services/rclone/rclone -v copy oldnas:/archive /mnt/archive
#/mnt/services/rclone/rclone config
You can see in above example some lines are commented - it's a good way to switch options on and off rather than completely delete them from script.
services/rclone/ and services/logs/ are directories in persistent location named services (actually it's ZFS dataset).
Note, in this example rclone copies file in reverse, from remote called oldnas: to local directory /mnt/archive.
XNAS 11.3.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2, 2 x HGST HDN726040ALE614, 2 x WDC WD5000AAKS, Ippon Back Power Pro 400

User avatar
crest
Hardware & Software Guru
Hardware & Software Guru
Posts: 873
Joined: 02 Jul 2012 22:25
Location: Vienna, Austria - GMT+1
Status: Offline

Re: Backup NAS4FREE to OneDrive

#21

Post by crest » 25 Oct 2018 11:08

Thank you :D

an update to the above -> viewtopic.php?f=56&t=12698&p=87447#p87447
NAS1: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI 760GM-P23; AMD Athlon(tm) II X2 250 7.58GiB RAM
NAS2: 11.2.0.4 - Omnius (Revision 6766) x64-embedded; MSI MS-7369; AMD Sempron(tm) LE-1250 8022MiB RAM
UPS: APC Back-UPS ES 550G
Extensions: OneButtonInstaller, Extended GUI, NextOwnCloud, BitTorrent Sync, Syncthing, Downloady, Midnight Commander, NCDU, MySQL, Rclone, Themes:

Post Reply

Return to “Data recovery and backups”