Migrating to a new backend

For discussion of topics specific to MythTV on linux
Post Reply
Abzstrak
Newcomer
Posts: 7
Joined: Thu May 21, 2015 12:01 am
United States of America

Migrating to a new backend

Post by Abzstrak »

ok, so I'm looking for pointers on the best way to proceed. I'm trying to replace my old backend spaceheater (overclocked amd 6 core with 6TB software raid5) with something smaller and less power hungry. The old one was a backend also running kodi as a frontend. It is running on Arch with up to date .27 and is running fine. I have 2 PCIe and 1 PCI Hauppauge ASTC encoders as well as a HDPVR on a comcast box. I have two additional dedicated frontends (fire tv's) as well as other frontends (laptop, tablets, phones, etc...)

The new backend is running ubuntu (don't feel like messing with Arch any more for this purpose. It is a dedicated headless backend only on celeron j1900 with 12TB software raid 5. The CPU isn't nearly as fast as the AMD, but I think it will be fine for commercial skip detection (i seldom transcode) especially since I no longer as using it as a front end. It is a micro itx box, so no slots to use for tuners, as such I have purchased a test usb ASTC tuner. If testing goes well, I'll buy two more and be set. I bought a 3rd firetv to act as a frontend for that tv.

I installed ubuntu server on the new box, then installed the xubuntu-desktop package and the mythbuntu packages. Everything seemed to go smoothly, but I've never run multiple backends. When I started up the backend it autodetected the old one and is running the new one as a slave.

So, I need to know what is best... can I set it up like this and then somehow promote it to master later? Or should I wipe the db and redo something to prevent it from becoming a slave and start from scratch? I don't care that much about transitioning recordings, anything of importance I'll just save out and view as a video file from kodi. I would like very much to save my recording schedules though, if possible.

Hopefully my ramblings make sense, just looking for advice.
User avatar
bill6502
Developer
Posts: 2439
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Migrating to a new backend

Post by bill6502 »

Running as a slave just means that the Master IP and Backend IP are different
in the DB (changed via mythtv-setup.)

Try starting the BE with the --noupnp flag. Also check ALL config.xml files in
ALL .mythtv directories. This command will find them: locate -b '\config.xml'
The <Host> should be localhost to access the DB on your new box.

The hostname is used as a Profile Name to access the DB settings and many
other tables. Search the mythtv.org Wiki for changing hostname or you can
actually keep the old boxe's name by setting it in config.xml (again ALL of
them):
<LocalHostName>yourOldHostNameHere</LocalHostName>
To be safe while testing this, just shut down (or disconnect from your LAN)
the old host.
Abzstrak
Newcomer
Posts: 7
Joined: Thu May 21, 2015 12:01 am
United States of America

Re: Migrating to a new backend

Post by Abzstrak »

Is there an easy way to just set up the new machine as a new master backend? To make it stop looking for other backends?

After thinking a bit, it seems easier in my current situation to just set it up from scratch... but I'm not sure how to make the new install stop looking for another backend.
Abzstrak
Newcomer
Posts: 7
Joined: Thu May 21, 2015 12:01 am
United States of America

Re: Migrating to a new backend

Post by Abzstrak »

so, on a hunch I checked my old backend, something is wrong with the scheduling, but I don't know what.... it must be something to do with the new server connecting to it, it has full guide data but it isn't scheduling anything unless it is a manual scheduled recording....

now going to score very low on the wife approval factor......

I fail to understand why it's default behavior for these damned backends to try to connect to each other...
Abzstrak
Newcomer
Posts: 7
Joined: Thu May 21, 2015 12:01 am
United States of America

Re: Migrating to a new backend

Post by Abzstrak »

ok, so I just purged out all the myth stuff as dropped the mythconverg database from the new backend. I'm going to attempt stopping the old backend, reinstalling the new one and hopefully it will think and understand it is to be a standalone master and stop trying to find others on the network.

I think that should work, but I do need to start up the old one to use as reference for recording schedules and export out some shows... hopefully it will play nice.

Bill6502, you mentioned starting up the backend with the noupnp flag, sounds good... I'll try it if I can figure out how to do that with systemd in arch... I guess I could just run it manually in a screen session.
User avatar
bill6502
Developer
Posts: 2439
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Migrating to a new backend

Post by bill6502 »

Just got systemd fired up on my office computer and have a backend (with
no tuners/channels) for learning. Here's how I pass variable arguments to
the mythtv-backend service:

1st, in the sevice file itself add a variable to the ExecStart line:
ExecStart=/usr/local/bin/mythbackend --logpath /var/log/mythtv --quiet $MYTHTV_BE_OPTS

sudo systemctl daemon-reload # After you change it. You'll get a reminder if you forget.
--logpath /var/log/mythtv is my choice, --syslog local7 is easier to maintain
And then, because I don't like to type much, create a new bash function:
function mstart () {
sudo /bin/systemctl set-environment MYTHTV_BE_OPTS="$1"
sudo /bin/systemctl start mythtv-backend.service
}
Then if you type mstart, the service starts normally, If you type:
mstart "--noupnp" or mstart "-v playback --loglevel debug --logpath /tmp" etc.
then that's added to the command line.
Last edited by bill6502 on Thu May 21, 2015 11:45 pm, edited 2 times in total.
Abzstrak
Newcomer
Posts: 7
Joined: Thu May 21, 2015 12:01 am
United States of America

Re: Migrating to a new backend

Post by Abzstrak »

awesome, thank you
Post Reply