Synology - Migrate to new NAS

Information and Tutorials on features in Mylar and how to use it
Post Reply
User avatar
DrSeussFreak
Posts: 122
Joined: Wed Jan 29, 2014 10:50 pm

Synology - Migrate to new NAS

Post by DrSeussFreak »

I have been running Mylar on my DS413j NAS for quite a while, but want to migrate it to my DS412+, since it has more horsepower. Any chance you can lay out the steps for me to perform this migration, so I can keep all my data intact?
"Adults are nothing but obsolete children, and the hell to them" - Theodor Seuss Geisel
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Synology - Migrate to new NAS

Post by evilhero »

DrSeussFreak wrote:I have been running Mylar on my DS413j NAS for quite a while, but want to migrate it to my DS412+, since it has more horsepower. Any chance you can lay out the steps for me to perform this migration, so I can keep all my data intact?
Sure, it should be fairly easy:
- Shutdown your current run of Mylar.
- Backup the mylar.db, config.ini, custom_exceptison.csv, substitutes.csv, and your entire /cache directory (it holds all the jpgs for the covers that are displayed).
- Install mylar on new machine using git clone -b development (to auto-switch it to the dev branch).
- don't run it just yet.
- copy back all the files you copied into their proper locations (.db, .ini, .csvs into the root of mylar, cache into the cache obviously)

.DON'T START UP MYLAR JUST YET.

In order to update all of your old series directory locations to the new series directory locations on your new machine, you need to change a few things in the .ini.
If the new location isn't exactly the same as the old location, do the following (note this does not move anything, it just changes where Mylar will look for your comics):
- edit the config.ini
- leave the destination_folder as it is (it should be pointing to the old location, which is required for this step to work).
- set locmove = 1
- set the newcom_dir to the Comic Location on your new machine (the full path is required)
- if you have folder formatting enabled within your configuration and going forward, you don't want your existing structure to follow a basic $Series/ format (ie. it's $Publisher/$Series or $Series/$VolumeYear or something), and you want to make sure all the folders will follow this same type of naming for folder formats - set the fftonewcom_dir = 1. Note that this will take your existing Folder Format string from the config.ini and mass apply it to ALL of the series directory locations within mylar.
- If you don't want mylar to rename your folders, set fftonewcom_dir = 0. This will still keep all your pre-existing subdirectory paths if they exist ( ie. /mnt/Comics/Marvel/Hush-(2012) to /mnt/myNewLocation/Marvel/Hush-(2012) )

Save the config and then start up mylar. It will proceed to change all the folder locations (within the db) to the new locations, afterwards it will set the locmove value back to 0 so it won't run again unless it's manually changed. Then go into the Configuration and change the Comic Location to the new location (it will show it still as the old location) - which should be the same as the newcom_dir value entered in above. Doing this will set it so that going forward, any new series that are added (or story arcs, etc) will have their respective directories be created off of this location. Save the config and then restart.

Everything should be working then as it is currently, except on your new machine! Hope this all helps ;)

Gotta love upgrading eh? I just hooked up a 3tb hdd onto my new sas expansion card that the wife got for me for christmas.
User avatar
DrSeussFreak
Posts: 122
Joined: Wed Jan 29, 2014 10:50 pm

Re: Synology - Migrate to new NAS

Post by DrSeussFreak »

This really isn't bad, and as I prepare to begin now, the only question I have comes around making the changes to the config.ini.

If I am going to use the same file structure and the paths will be identical to the original NAS, do I need to make any changes?
"Adults are nothing but obsolete children, and the hell to them" - Theodor Seuss Geisel
User avatar
DrSeussFreak
Posts: 122
Joined: Wed Jan 29, 2014 10:50 pm

Re: Synology - Migrate to new NAS

Post by DrSeussFreak »

When starting up Mylar, I get this error

Code: Select all

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/volume1/@appstore/mylar/share/mylar/cherrypy/_cprequest.py", line 645, in respond
    response.body = self.handler()
  File "/volume1/@appstore/mylar/share/mylar/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/volume1/@appstore/mylar/share/mylar/cherrypy/_cpdispatch.py", line 29, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/volume1/@appstore/mylar/share/mylar/mylar/webserve.py", line 79, in home
    totalissues = comic['Total'] + annualcount
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
"Adults are nothing but obsolete children, and the hell to them" - Theodor Seuss Geisel
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Synology - Migrate to new NAS

Post by evilhero »

You're using some weird / not-current branch/commit of mylar. That line doesn't exist in either the Master or Development branch, so not sure where the error came from in that regards.

How did you install mylar on the new machine ?
User avatar
DrSeussFreak
Posts: 122
Joined: Wed Jan 29, 2014 10:50 pm

Re: Synology - Migrate to new NAS

Post by DrSeussFreak »

it is from SynoCommunity, they package apps, like yours, for easier install on Synology devices
"Adults are nothing but obsolete children, and the hell to them" - Theodor Seuss Geisel
User avatar
DrSeussFreak
Posts: 122
Joined: Wed Jan 29, 2014 10:50 pm

Re: Synology - Migrate to new NAS

Post by DrSeussFreak »

I got it working, I had to install mylar fresh from the repo, start it and update it to the latest, then shut it down and replace the stock files with my backups, then, all is good!
"Adults are nothing but obsolete children, and the hell to them" - Theodor Seuss Geisel
Post Reply