Page 1 of 1

Backup config on synology (linux noob)

Posted: April 2nd, 2020, 5:10 pm
by rudnicke
Hello. I'm going to upgrade my Synology and would like to backup the config of SABNZBD so I can restore it on the new unit. I've seen a couple posts about going in via SSH and then copying the file to a directory that is accessible, but it doesn't seem to be working.

One had me go to /usr/local/sabnzbd/var and look for the .ini file. The instructions stated that I needed to run "chmod -R +r /usr/local/sabnzbd/var" before I can copy the file. I did this and it just threw up a slew of errors.

I haven't even gotten to the point of figuring out what the copy command is, let alone, how to use it.

Is there a set of step-by-step instructions that I can follow to backup this config? I don't want to have to manually re-configure SABNZBD (I have too many RSS feeds and other settings to re-type).

I know, this is a good learning moment and I should just research it by myself, but I'm under a time constraint here. I just need some help please.

Thanks.

Re: Backup config on synology (linux noob)

Posted: April 3rd, 2020, 12:57 am
by sander
My tries: connect to synology:

Code: Select all

$ ssh admin@192.168.1.1
admin@192.168.1.1's password: 
OK, I'm in. Let's see:

Code: Select all

admin@DiskStation:/$ ls -al  /usr/local/sabnzbd/var 
total 52
drwxr-xr-x 5 sc-sabnzbd sabnzbd 4096 Mar 22 18:13 .
drwxr-xr-x 8 sc-sabnzbd sabnzbd 4096 Jan  2 18:23 ..
drwxr-xr-x 3 sc-sabnzbd sabnzbd 4096 Mar 22 18:13 admin
-rw------- 1 sc-sabnzbd sabnzbd 8867 Mar 22 18:13 config.ini
-rw------- 1 sc-sabnzbd sabnzbd 8867 Mar 22 18:13 config.ini.bak
drwxr-xr-x 2 sc-sabnzbd sabnzbd 4096 Jan  2 18:27 logs
-rw-r--r-- 1 root       root    2330 Jan  2 18:26 sabnzbd_install.log
-rw------- 1 sc-sabnzbd sabnzbd    5 Mar 22 18:13 sabnzbd.pid
drwxr-xr-x 2 sc-sabnzbd sabnzbd 4096 Jan  2 18:10 scripts
admin@DiskStation:/$ 
Oh, so it's config.ini (not sabnzbd.ini)?!

Code: Select all

admin@DiskStation:/$ more /usr/local/sabnzbd/var/config.ini
more: cannot open /usr/local/sabnzbd/var/config.ini: Permission denied
Ah, then go the higher level: super user:

Code: Select all

admin@DiskStation:/$ sudo su -
root@DiskStation:~#

root@DiskStation:~# head -4 /usr/local/sabnzbd/var/config.ini
__version__ = 19
__encoding__ = utf-8
[misc]
permissions = 777

And now I understand your "I've seen a couple posts about going in via SSH and then copying the file to a directory that is accessible, ". But first: what is the URL of the post you followed. I don't want to invent the wheel for you. And post the error message you got.

(OK, let's see what a accessible dir is:

Code: Select all

root@DiskStation:~# cat /usr/local/sabnzbd/var/config.ini | grep -i complete_dir
complete_dir = /volume1/downloads/complete
So, yes, copy to there, and chmod and maybe chown)

Re: Backup config on synology (linux noob)

Posted: April 3rd, 2020, 1:00 am
by sander
rudnicke wrote: April 2nd, 2020, 5:10 pm Hello. I'm going to upgrade my Synology and would like to backup the config of SABNZBD so I can restore it on the new unit.
BTW Very valid use case. I think this should be doable via the SAB webGUI ... just like it's possible to export your own data from cloud services like Google Drive and Google Mail

A possible problem will be the directories, but the rest should be OK: news server accounts, RSS URLs, etc

Re: Backup config on synology (linux noob)

Posted: August 10th, 2021, 1:59 am
by iUseNetter
I would like to add my "me too" to Backup and Restore.

Please zip the file config.ini and the content of the /var/admin folder and let the user download this zip file to a local computer.
Then, after a new or re-installation, let the user choose/browse for this local backup zip file, upload it to the NAS and extract the files back to it's origin place.
Please also adjust the access rights and stop restart SABnzbd if necessary.

This would help a lot of users not so familiar with Linux or busybox and SSH on a Synology NAS.