Copying config.ini and history from old Synology to new Synology?

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
user2000
Newbie
Newbie
Posts: 6
Joined: May 4th, 2021, 3:29 pm

Copying config.ini and history from old Synology to new Synology?

Post by user2000 »

Hi all, thought I'd be smart and simply use Midnight Commander to copy and paste my var folder from my old DS1019+ to the new 1821+

I installed Sab, same version, let it creat it's folders, then stopped the package and copied the config.ini and history over.

However the package will not start (and I had more info but "New users are not allowed to post links", even though there were no links in the log file I posted...)


I tried to chown the folder but this didn't work.


Again I find my years of troubleshooting Windows lets me down in Linuxland, so any help gratefully received as I'd rather keep my history and download data.


I didn't have it running in Docker, much to my annoyance...


What do I need to do to retain my history on my new NAS? Not so bothered about the config, I can just put my usenet details etc in again, but the history would be handy.

Cheers in advance.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by sander »

history is in .sabnzbd/admin/history1.db

First make sure SAB is running on the new machine.
Then stop SAB, and copy in that file.
user2000
Newbie
Newbie
Posts: 6
Joined: May 4th, 2021, 3:29 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by user2000 »

First thing I did.

the path where the history1.db on Synology is /usr/local/sabnzbd/var/admin

When I start the package on the new Synology after copying the history over, SAB starts, but this happens when the web interface is opened:

Unrecoverable error in the server.
Traceback (most recent call last):

cherrypy.process.wspbus.ChannelFailures: OperationalError('unable to open database file')



I CANNOT post the log because this forum thinks I am posting links to sites, when I am not! It's freaking out about Python3.8 mostly.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by sander »

... I've removed that post-limit from you. So you can now post anything.
user2000
Newbie
Newbie
Posts: 6
Joined: May 4th, 2021, 3:29 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by user2000 »

sander wrote: May 5th, 2021, 3:01 am ... I've removed that post-limit from you. So you can now post anything.
OK cheers for that (and sorry, hit the report post button instead of quote there, doh! I'm really showing myself up here lol)

I should say that both my old 1019+ and the new 1821+ are both running the latest version of DSM, Synology and Python

Here is what I get when copy only history1.db over and then restart SAB:

Unrecoverable error in the server.
Traceback (most recent call last):
File "/volume1/@appstore/sabnzbd/env/lib/python3.8/site-packages/cherrypy/_cpwsgi.py", line 184, in trap
return func(*args, **kwargs)
File "/volume1/@appstore/sabnzbd/env/lib/python3.8/site-packages/cherrypy/_cpwsgi.py", line 104, in __call__
return self.nextapp(environ, start_response)
File "/volume1/@appstore/sabnzbd/env/lib/python3.8/site-packages/cherrypy/_cpwsgi.py", line 423, in tail
return self.response_class(environ, start_response, self.cpapp)
File "/volume1/@appstore/sabnzbd/env/lib/python3.8/site-packages/cherrypy/_cpwsgi.py", line 236, in __init__
self.run()
File "/volume1/@appstore/sabnzbd/env/lib/python3.8/site-packages/cherrypy/_cpwsgi.py", line 311, in run
request, resp = self.cpapp.get_serving(local, remote, scheme, sproto)
File "/volume1/@appstore/sabnzbd/env/lib/python3.8/site-packages/cherrypy/_cptree.py", line 148, in get_serving
cherrypy.engine.publish('acquire_thread')
File "/volume1/@appstore/sabnzbd/env/lib/python3.8/site-packages/cherrypy/process/wspbus.py", line 248, in publish
raise exc
cherrypy.process.wspbus.ChannelFailures: OperationalError('unable to open database file')
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Copying config.ini and history from old Synology to new Synology?

Post by safihre »

Probably a permissions error. The user SABnzbd is running as has different permissions than the user you SSH with.
Check the permissions and users/groups of the other files in the admin directory.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
user2000
Newbie
Newbie
Posts: 6
Joined: May 4th, 2021, 3:29 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by user2000 »

safihre wrote: May 5th, 2021, 3:35 am Probably a permissions error. The user SABnzbd is running as has different permissions than the user you SSH with.
Check the permissions and users/groups of the other files in the admin directory.
Not sure how I would do that? I'm a Windows guy, so I'm just an instruction follower when it comes to linux based stuff.

That is exactly what is wrong here - I'm needing a helping hand if you don't mind with the command to change history.db to the sc-sabnzbd user and group...

-rwxrwx--- 1 user2000 users 12607488 May 4 21:18 history1.db
-rw------- 1 sc-sabnzbd sabnzbd 18 May 5 09:49 postproc2.sab
-rw------- 1 sc-sabnzbd sabnzbd 20 May 5 09:49 queue10.sab
-rw------- 1 sc-sabnzbd sabnzbd 20 May 5 09:49 Rating.sab
-rw------- 1 sc-sabnzbd sabnzbd 5 May 5 09:49 rss_data.sab
-rw------- 1 sc-sabnzbd sabnzbd 85 May 5 09:49 totals10.sab
-rw------- 1 sc-sabnzbd sabnzbd 21 May 5 09:49 watched_data2.sab
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by sander »

Code: Select all

-rwxrwx--- 1 user2000 users 12607488 May 4 21:18 history1.db
Not good. "chown" is your friend.

But maybe easier to change the rwx bits from
-rwxrwx---
to
-rwxrwxrwx

with

Code: Select all

chmod 777 history1.db
... and then it should work: user account sabnzbd can read and write it.
user2000
Newbie
Newbie
Posts: 6
Joined: May 4th, 2021, 3:29 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by user2000 »

sander wrote: May 5th, 2021, 4:54 am

Code: Select all

-rwxrwx--- 1 user2000 users 12607488 May 4 21:18 history1.db
Not good. "chown" is your friend.

But maybe easier to change the rwx bits from
-rwxrwx---
to
-rwxrwxrwx

with

Code: Select all

chmod 777 history1.db
Excellent stuff, that did it.

Should I be changing the owner of the history1.db away from my admin account to the sc-download default to keep things tidy?

Also if I want to import my old config.ini would I just apply the same method as you posted? I really only want to keep my api key so I suppose I could just manually edit the new config.ini and change the api key?

Thanks again though, the history1.db was my main concern!

One other, off topic matter. Since the Glitter interface is now the default I can't seem to find a way to search my history - this was always useful when downloading a lot of things as it let me double check quickly if something had already been grabbed. Is the search bar removed in this interface?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by sander »

As you were able to handle chmod, I expect you can handle chown too ... So, go ahead.

config.ini: yes, just copy the API key. Via the GUI, I would say.

glitter: open separate thread please
user2000
Newbie
Newbie
Posts: 6
Joined: May 4th, 2021, 3:29 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by user2000 »

sander wrote: May 5th, 2021, 6:18 am As you were able to handle chmod, I expect you can handle chown too ... So, go ahead.

config.ini: yes, just copy the API key. Via the GUI, I would say.

glitter: open separate thread please
Ths problem I came across before was that there does not seem to be a way to change the API key via the GUI - one is generated for you but cannot manually be changed, so the only way to enter your own API would be by editing the config.ini by the looks of it.

Just want to check the correct use of chown to change the user and group, is it just simply:

chown sc-sabnzbd:sabnzbd history1.db

?

Thanks again for your time.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Copying config.ini and history from old Synology to new Synology?

Post by sander »

I think "chown sc-sabnzbd:sabnzbd history1.db" is correct. I'm sure who can do that ... can user user2000 do that (and thus give ownership to another user)?

Just try. Maybe first on a copy of the file.
Post Reply