Export comics to new server

Information and Tutorials on features in Mylar and how to use it
Post Reply
nlerik
Posts: 2
Joined: Mon Jun 17, 2019 5:32 pm

Export comics to new server

Post by nlerik » Mon Jun 17, 2019 5:41 pm

Hi,

I was searching for a way to move my comics to a new server. So i came here in the hopes of some guidance.
i saw the following posts:
viewtopic.php?f=12&t=1857
viewtopic.php?f=12&t=1960
viewtopic.php?p=9810#p9810

But i couldn't really match it to my situation. Rather be safe than sorry.

My old environment was a ubuntu server with mylar. The new one is also running ubuntu but with Docker (mylar). The location of the files on the HOST is the same (/mnt/comics), but in the docker-container it would be different (/shared/comics).
I already configured the new mylar with the exact same settings (except for the location ofcourse).

What do i need to do to copy over my existing comics-library (what do you call it?) to my new setup?
- do i still need to copy config.ini? (anything i need to be aware of?)
- do i need to copy the .db file? (- is it called mylar.db?)
- do i need to move the cache folder as well?
- i didn't quite get the 'update'-option, but i'm not sure if it's relevant in my case.

Is there anything else that i need to do?

nlerik
Posts: 2
Joined: Mon Jun 17, 2019 5:32 pm

Re: Export comics to new server

Post by nlerik » Sat Jun 22, 2019 7:36 am

So I started to try it for myself. It was a new Mylar setup so i couldn't screw it up anyway. But I think i was simply to tired when i made this post, because evilhero pretty much wrote it in This post.

Although the title and location of the answer are a bit 'confusing' (i mean: does this apply to me? where is the answer to this question? that kind of thought occurred to me).
Therefor, i'll write the answer here as well with a bit more explanation and screenshots. I'll also copy-paste some text written by Evilhero. (I hope this is alright with @evilhero?).

How to export/move existing mylar comics to a new mylar-setup

As Evilhero said, this procedure requires a few actions, but don't worry, it really isn't all that hard.
NOTE: always make a backup of existing data before continuing
Step 1
Copying current database to the new mylar server.

There are 3 things you need to copy:
  • config.ini (Hosts all your settings)
  • mylar.db (hosts all your comicbook data and locations)
  • cache (note: this is a folder)


In the cache-folder, only the .jpg files matter. For Example: in my cache there also were several .nzb files, you can copy them along if you want or remove them afterwards. As long as you keep the .jpg files (these are the posters of your Comics).

Copy those 3 items to your new mylar server.
Do keep in mind that it is possible you need to change the config.ini in order for the new mylar to work. You might have a different Port or different IP-Address. Or your locations might be different.
The following steps require the new Mylar server to work. If you can't access it, you will need to fix that first.

Step 2
In the new Mylar GUI, make sure the 'Comic Location' is pointing to the OLD comic location.
you can find this under: 'Settings' > 'Web Interface' (make sure to save the changes)
i.e.: my previous location where i stored my comics was /mnt/Comics. https://imgur.com/a/HjVHiWB

Step 3
shutdown the new mylar (This is different for everyone. I use docker so i just stop the container).

Step 4
Edit config.ini of the new Mylar. (Unfortunately this is also different for everyone. You will need to find out where it is stored on your computer. Most likely it is in the folder where mylar was installed.)

Step 5
Once you're inside the config.ini file, locate the [Update] section (including brackets). It will look like this: https://imgur.com/a/ZC4H1eQ
If you don't have this section in your config.ini, you are most likely not using the latest version of Mylar. It is recommended to update to the latest version of Mylar before proceeding.
Step 6
Set the [update]-variables as following:
  • locmove = True
  • new_comdir = location-of-where-your-comics-are-stored-now
If you have special folder formatting that involves subdirectories (ie. your folder format is set to $Publisher/$Series kinda thing...) set the following variable like:
  • fftonewcom_dir = True
In my case, i didn't have any special folder formatting, my settings are like this. So for me, all i had to do was change locmove and new_comdir. My new comics location is /shared/comics (NOTE: in unix things are CASE SENSITIVE).
This is how my [update]-section in config.ini looked like.

Step 7
Save the changes to config.ini

Step 8
Start the new mylar. It should now convert all existing Comicbook locations to the new location. Here is an example.
Once it's finished, you can verify it worked by just going into a few series and making sure they're pointing to the correct location.

Step 9
Once you have confirmed that the new mylar server has all your comics with the correct location, you need to change the Comic Location from Step 2 to the new comic location. In my case that would be /shared/comics. (Don't forget to save the changes).
Once it's converted, the locmove value will be automatically set back to a False value so that the process doesn't run on every startup sequence thereafter.
Warning
Just keep in mind that at this stage, it's just changing the location in the database - it's not creating/moving directories at all.If however, the directories don't exist in the new location, when Mylar attempts to update the series via either a Refresh or via automated scheduling, it will create the directory in the new location. If the creation of directories is something that you don't really want/need - Mylar will only create them when it needs to put an issue in the given series directory if you have the create_folders option in the config.ini set to a value of False. Otherwise, by default it's set to True, it will create if they don't exist (when Refreshing/Adding)
That is all, i followed these steps and my new Mylar server is running with all the Comic Issues i have stored.

Post Reply