Help Migrating from RPI to PC

Ok, I installed my new Beelink Mini S computer, and for now left it on the default Windows 11 Pro that it comes with. I ran a DB backup before moving the drive from the RP, and installed Channels as a service on the mini s, and it's running. When I did this, I moved the 4TB WD drive from the RP, and plugged it into the back USB port on the Beelink. I then did a "RESTORE" and pointed it at the drive Database folder per the migration instructions. I did a RESTORE on that last backup, and it ran through all it's motions and works.

However, for SOME reason, when it indexed everything, it doubled up the count of some of my imported tv shows. For instance, say that I only had 3 episodes in the show folder total, season and episode S01E02, S01E03, S01E04. I now show SIX episodes total, as each of those doubled-up, and they all are playable. None of them errored.

Why, and is there and easy way to fix this without going through a manually deleting every other episode?

Please submit diagnostics from your Channels DVR Server web admin.

Ok, just be aware it's been rebooted a few times since the initial setup, and is presently still re-indexing stuff from a USB 3TB second drive.

Logs have been submitted as b84e55ca-8c23-44d5-8918-0bca24743b30

It shouldn't be re-indexing anything, so there's clearly an issue.

It sounds like, and appears (based on dupe content with different paths) that you've re-added your personal media import sources, so it's importing the files again.

Recordings restore fine because the relative paths are the same as they were before. But your imported sources have different paths now, so there's no way around re-indexing.

Go ahead and let it complete indexing, and then run the maintenance action Prune Removed Media

image

This will look through your full library and remove anything from your library that it can not find on disk. This will remove the dupes.

1 Like

Ok, thanks! I'll try that when it's time, and let you know.

Well, it took a long time to index everything. In fact, it seems to have run it more than once. I then ran that PRUNE command, but it didn't fix/remove the imported dups. The dups are all valid, BUT, they have different File Id's for some reason, like it thinks there's multiple copies of them. Why should it do that? Guess I'll have to run through and delete the dups all manually. Unless in doing so, it'll delete the one and only copy?

Man, moving from the dedicated Channels RP image to this mini computer has been a real mess. I don't understand why either. The version of Windows 11 Pro it came with said it was "End of Service" for some reason. So, I ran Update, it then installed Windows 11 version 24H2, and once it did that, that version of Windows clamped down tight on networking.

I can manually map network drives on the pc, but Channels can't "see" them for some reason. They are not password protected, anybody on my internal network should be able to see them. Channels UNC mapping doesn't work on this version of Windows, and I'm using the right names because I ran the Net Use command and copied those.

P.S. Finally got the UNC network paths fixed and working. See fix in the below posts. Basically, make the Channels service log in as a local user, NOT just as the default Windows account at startup. IMO, that should be added in the setup instructions for a Windows version of Channels that's run as a Service.

File IDs are the unique ID of the record in the library, they don't have anything to do with the actual files on disk.

Imported media is deemed unique to the library based on their paths, not the content of the files, so if the source path is different, then they will be deemed different files.

In terms of the dupes, I assume they're only from imported Personal Media. Is that correct? It may be worth trying to remove all your Personal Media sources and running the Prune Removed Media to get rid of them all from your library, then adding them back again.

Or, re-running the restore from backup, and doing this.

Yes, it appears these are ONLY from imported Personal Media. Unfortunately, some of the personal media is on the same drive the database and such is on, so I can't easily remove them by unplugging the drive. I just tried deleting a couple dups, and got interesting results posted in the log file. Saying it couldn't find some of them. If that's true, why didn't the PRUNE remove them? Perhaps if you check it, it might give us more info? Also, there was some sort of PANIC error from Github earlier. Not sure what that was about, maybe another issue because of Windows, or just a temp thing?

22315e57-ab2b-4fc7-9a42-06f5130c7224

If you installed Channels as a service, did you setup the account to use in the service. By default, it uses the local System account. I only use local drives and haven't updated my server to 24H2, so just a guess not knowing how you are setup.

See these posts, Channels not restarting after Windows update

That's likely the fix in that thread, thanks! However, I don't know how to get that to come up to make that login change. I made a reply in that thread asking that user how he did it.

Thanks! Maybe that'll fix me up once I can get that figured it and change it.

Thank you Michael! Pointing me to that thread got the issue with the UNC network shares fixed, after I read that post by Edwin. I set Channels service to log in with my userid and password local account, and now that part is working perfectly!

If I had known this yesterday, I wouldn't now have to deal with all these duplicated Personal Media selections. Oh well, dealing with Windows can always be a real trip!

Ok, a lot of these dups are on the SAME USB drive that was plugged into the RP running the built Channels image. It was created when I did the RP Channels image setup per the instructions. They are in the IMPORTS folder on that drive, in respective sub-folders, Tv, Movies, Videos.

That drive after moving it from the RP to the new Windows machine, is now the D:\ drive, instead of just /media/dvr on the RP

Can I temporarily rename the IMPORTS folder to something else, like "OLDIMPORTS". Then run the "Prune Removed Media" to get rid of them from the database as you said. Then after that completes, rename it back to IMPORTS, then run the "Scan Personal Media" to get them re-added, but hopefully with no more dups?

You may want to look at recorded file json for the duplicates to see what directory Channels DVR thinks they're in.
This one is in Imports/Movies under my Channels DVR recording directory

Capture

It thinks they are all in the same respective folders, IE: Imports\Movies or Imports\Tv, etc. The dups are all valid, and IF you delete even one of them, it deletes the other one also. Like the database messed up the restore, and created TWO references pointed at the same file, but with different File ID's.

If that's the case and you do what you're planning, you'll have to reimport and rematch them.

Correct. Is there any other way to fix this? I can't even manually delete them, because it deletes both of them.

Not that I know of. Maybe @maddox or @tmm1 knows of a way.

Personally I would rather deal with the duplicates than have to rematch and edit metadata.
Depends on how many you have and your pain threshold!

Can you screenshot your settings? What did you add or change after the restore?

I didn't add anything. I simply MOVED the USB drive from the Channels Linux Raspberry Pi built image, to a Beelink Mini S Windows 11 minicomputer.

When it was plugged into the new Windows machine, it came up as D:. Then when I did a RESTORE, it somehow duplicated the file indexes on all user imported files on that drive, created what looks like double the amount of files. Those files are in D:\Imports\TV (or Movies). Previously on the RP, they were on /media/dvr/imports\tv (or Movies)

Kind of confusing, hopefully I'm explaining it well enough that you can understand.