NextcloudPi : Backup / store files to Synology NAS?

Hi !

What could be the best way to store my nextcloud data to my synology nas, and backup nextcloud to it too ?
I’m a noob in the linux world, but achieved to get my nextcloud working on my pi :slight_smile:
I’ve read some things about mounting it using fstab, or webdav / nfs / samba ?
Any advices to point me to the right direction appreciated !

Thanks !

And if you synology nas breaks down, you just restore from your backup. Wait, it was on the synology nas as well …

You can either mount the whole data-folder on your linux system via webdav/nfs/scp/samba from your NAS. This way you have the whole storage on your NAS, it will be more difficult to provide alternative access for each user individually on the NAS directly (without passing through Nextcloud). You can use it for each user as external storage, advantage, this user can access the content directly from your NAS (without Nextcloud) but on Nextcloud it is an external storage, not the native storage (so you always have to work in a subfolder).

Use an external harddrive for a backup. It’s probably a good idea to backup your config.php and the Nextcloud database regularly on the NAS as well, especially if you run your RPi from an SD card which happen to fail after some time.

If you are using NCP, it would be good to auto-backup, and maybe also auto-rsync the backups to a different drive (such as your NAS).

In order to access your files over something SAMBA I recommend that you just mount it. NCP has tools for synchronization

See this article

Personally I installed Nextcloud on my NAS Synology and that works perfectly.
Some “regulations” to be made but everything is OK.
Only “soucy” the solution of which I have not found yet: to put the data directory on another volume and not directly in the Nextcloud directory (/data/). Problem of rights certainly.

How did you install Nextcloud on your NAS ? Docker ? If so, what image ?

Just by downloading the most recent version of Nextcloud and extracting it in /volume1/web/.
I used some tutos found on the Internet.
For example :
[http://blog.viking-studios.net/en/your-own-cloud-nextcloud-installation-on-a-synology-diskstation-and-dsm-6/]

1 Like

I’ll stick to my separate Pi nextcloud installation, better for me this way.
So I created a smb share in nextcloud, using external storage, I have read/write access to it.
How can I configure nc-backup/nc-backup-auto to store in this smb share ?
I saw the web ui config at https://my.nextcloud:4443 , but don’t know the right path syntax I should use in “DESTDIR”.

Thanks !!

I had begun the use of Nextcloud so, on Raspberry + data on on mount FS to the NAS.
The fact of having tipped over Nextcloud on the NAS relieved my Raspberry and is more reassuring. Then, it depends on the NAS, RAID or not, etc…
At my home, I have 4 DD on my NAS, among which 2 in RAID1 with the data of the cloud above
To backup Nextcloud (data + configuration), I developed a bash script which makes simply a “tar” compressed with " gzip " and coded with “gpg”. The kackups are deposited on another DD of the NAS and are synchronized with an account on Méga. I keept it 6 weeks.
That works perfectly.

Your solution seems great, but a bit complicated for a novice like me, I doubt to be able to make such a script :sweat_smile:

It isn’t complicate, no worry !!!

Sorry for digging into this old thread.
But I’m also in the same situation, I want to backup into my synology smb share. I have successfully mounted it into nextcloudpi with the “external storage” function.
But what is the correct path to this smb share? ->

@Jodl_Dodl Mounted as external storage, meaning there is no path internally, Afaik.

You’d have to create a mountpoint and mount it internally using fstab.
Depending setup duckduckgo “How to mount smb with fstab” should get you there.