Jump to content

DSM 6 to DSM 7 Emby Migration Instructions


Carlo

Recommended Posts

yarez0

Hi guys, trying to do a complete tuto for those who don't understand what to do. hope it helps

 

first, DSM migration is not a simple upgrade, there is a lot of changes that's why there is a DSM6 and a DSM7 version of emby ! it's not as simple as that, historically synology let devs to do some tricks to get access to some ressources that is not possible anymore in DSM7, emby guys need to recode the app.

 

I created a VDSM6, last version, Emby last version, same configuration as I had before migration (at the difference I was in beta) :

  • 1 share video with subdirectories
  • DSM EMBY user full rights on it
  • custom cache, logs, transcode files and metadatas paths
  • some users

by the way I recommand the nfo metadatas files creation for all your files and libraries...

 

STEP 1 : DSM 6 - where are my datas ??

start by looking the paths on the dashboard 

image.png.03c2dd14d273fdcd0eb1779124c91d58.png

then take a look on the settings

image.thumb.png.8da3bf0a1b9563c20603d88735e82ba8.png

 

go to the library advanced options

image.thumb.png.5bd6f1ef4bdcc69465a5631a764670dd.png

 

then the transcoding temporary path

image.thumb.png.6f437c21080e8b656cfaeadae6c5cde3.png

 

and the conversion temp path

image.thumb.png.92d7684ab763ab90b316aef4b35975e6.png

 

keep in mind where are your datas ! wrote it somewhere.

 

STEP 2 : Am I in the latest version of emby ? 

check it, double check, if not, stop emby, go download the latest package and upgrade. 

image.png.b1f4cd6cb0a531ec85ef25d16162ae66.png

let's do a restart to be sure

 

STEP 3 : stop and delete emby from DSM

image.png.a748606ceab9d1ae377e1996cd9ea5ba.png

image.png.e70c1f0a58396b888a1a7c2b79467ddb.png

 

STEP 4 : leeeeeet's GO

upgrade your DSM to version 7

image.png.9c5f3dcbe7b4a109a2df03fb244f43c5.png

now we can do hard stuffs

 

STEP 5 : install emby FOR DSM7

https://emby.media/synology7-server.html

choose the right package (to me 64-bit), and install it manually. the package is called synology7_4.6.4.0

image.png.c52b36aa6d1b4f8d846a62ffccf57a4e.png

 

let the run after installation check box, we need to let emby starts to let it create its files

image.png.7ba54d02b1ec16475ad55d44a07e28b2.png

 

and stop it

image.thumb.png.2d8377e976a20c31a69ce49a00183c65.png

 

STEP 6 : remove emby_pkg user and video group

go the control panel - user and group and remove the emby__PKG_ user

image.png.a8e10132ab7a25708657f321e2b10040.png

no more user

image.png.c5272c1387d618100337c85c3f4b67a2.png

 

still in user and group, go to the group tab and delete de video group

image.png.4a1643ca7d77b3eb93312fa87f77dea2.png

 

no more video group

image.png.3849e02092c059801de2174bb7961008.png

 

now, to be sure, go edit your user account to check if you still have all access to your shared folders. return to the user tab and edit your user, if you have multiple users, edit them all

image.png.abce5f2cba79a48d2f3f5fc0a981d97d.png

 

then go to the permission tab, I lost my access to the emby shared folder in the migration. check and double check your access to all your folders (if you have sonarr, radarr... you will do the same to give back the sc-xxx groups rights, but it's another subject)

image.png.e7431d5b7247a25ac6454b00216a17ce.png

 

do the correction and SAVE

image.png.8a18552b959b3f1da4c098116bce5ceb.png

for those who use the admin user, we talk about it later but yes you have to do the same with it

 

STEP 7 : give rights to the emby user on your shared folders

the emby user is a local system user, it is hidden, we need to give it the right to access the folders. stay in the control pannel and go to the shared folders, remember the paths on the step 1 ? in my case it was the shared folder called emby for the custom paths and the share called video to my libraries. edit your folders.

image.png.582dbb31ba387433c35009de49f63c8d.png

 

go to the permissions tab, the emby user is not here, that's normal, click on local users and select system internal user

image.png.cca15142a05dbb8e007d30b357f5a52c.png

 

now you can give read/write access to the emby user

image.png.6477d604a1b6957791b189177c2434f9.png

 

do the same FOR ALL THE SHARED FOLDERS emby has access to

 

STEP 8 : technical stuff

emby is still down, user rights are clean, now we have to copy/paste all the previous files from emby on DSM 6 to emby on DSM7. the reason is simple : the package is not installed in the same directory.

to do that we need to go in cli (Command Line Interface) but synology is not that simple, you can't do it with your "classic" user you need to do it with the admin account and get an "elevation" to the root user. AND, the admin user is, for mostly people, disabled by default.

 

(for those how the admin account is enable because they use it, just check if you can access all the folders, some rights disapeared with the migration)

 

so, let's go the control pannel, user and group and edit the admin user, by default, it is disabled

image.thumb.png.9a04ecb732c2bc2108fac98f8a66539a.png

 

uncheck the box disable this account

image.png.fdfce882ec8d071ab5ca6f3be1ffd4a7.png

 

now go change password, because if you never used this account, it has no password

image.png.4c1debe464837e08ea3ce15149bf078b.png

 

the account is now ready

image.thumb.png.4f62062c3130d037ab7dbeed4752b723.png

 

to get access to the cli, we need to activate the SSH service, stay in the control pannel and go to terminal & snmp to activate the SSH service, let the port 22, don't forget to apply modification

image.thumb.png.ec801c067079912c851f9d275036a7e4.png

 

now you need an ssh client, I use mobaxterm but for you let's use putty, you can download it here

https://www.putty.org/

we don't need to install the whole package, juste download the exe file

image.png.c411314a29be6fd5715d24e6e3b8d2f3.png

 

then run it, check if you are in SSH and enter you synology IP

image.png.6599359f58e16e04e1ae050bcf4c3844.png

 

if you can't access to your NAS, you did not apply on the SSH service page, go back and check..

accept the keys and log in with the admin account

image.png.37d7e305c66313db363dd000dffaddb1.png

 

we now need an elevation, type the command 

sudo -i

the password is the same as the admin account, you are now root

image.png.7aa1ade64262f84413ba89478b0b9e13.png

 

STEP 9 : copy old file to the new location

still remember the path of your files ? we have to copy them now with the command 

cp -rv /volume1/Emby/* /volume1/@appdata/EmbyServer

it means Copy -RecursiveVerbose <old emby path/all file> to <new emby path>

image.png.44eaec6cbf72d82faeb097c9cd9af6ef.png

 

depends of the number of your files, the copy will take some times, when you returns to prompt, the copy is done

image.png.a970675523805bf8ae6c2e87d62d31b3.png

 

now we have to give back the good rights to the user emby on those files, so we have to pass the command 

chown -R emby:emby /volume1/@appdata/EmbyServer

image.png.aa38b52188b21304594c9854e8277049.png

 

keep putty open, just in case there is a users and library problem...

 

FINAL STEP : START EMBY

dark screen, starts good...

image.thumb.png.e5e9d274e9e6f017ca327ff7bc7a9cbf.png

 

check the paths (remember step 1..) and delete all custom, some paths keeps the old one, some paths are still in the emby shared folder

image.png.10337b28f90b7ff0dc82fa7a0dac92ff.png

settings, delete cache path

image.thumb.png.fb41c4f9e687d4b2851459daf2d7991e.png

 

library (empty, here we go...), metadata cache empty, save just in case

image.thumb.png.584ebd4a23399b4a1086c6bc4dde86c0.png

 

transcoding path empty, save

image.thumb.png.d12b4b76dd69f1d856ce0bc15b8a8a8e.png

 

convertion, settings, delete path and save

image.thumb.png.ee9470c7636502ac7415c256c9932221.png

 

check all the previous old custom path and restart emby

 

FINAL FINAL STEP : where are my users and libraries ???

now got a empty users and empty libraries, but the configuration is ok. don't panic. stop the emby server

return to putty and do the command

rm -r /volume1/@appdata/EmbyServer/*

it will delete all the file in the new installation path of emby, don't delete file until emby is not completely down.

then redo the command 

cp -rv /volume1/Emby/* /volume1/@appdata/EmbyServer

image.png.47f6ab469b9e2fe15baa3b6147ae361f.png

 

and redo the command 

chown -R emby:emby /volume1/@appdata/EmbyServer

 

start again emby and voilà !

image.thumb.png.560e191f53716d26860a674bb24060b8.png

image.thumb.png.ceb2b6f38e68d1a9e6765481012b6121.png

 

all good !

 

when all done, you can close putty. you can also disable the SSH service and disable the admin account if you don't need it. remember control pannel user and group for the admin user, terminal and snmp for the SSH service

image.png

image.png

image.png

Edited by yarez0
remove extra pics at the end
  • Like 5
Link to comment
Share on other sites

Thanks, that pretty much matches the instructions and movie in the first post but with a couple of extra steps you've thrown in.

Link to comment
Share on other sites

yarez0
1 minute ago, cayars said:

Thanks, that pretty much matches the instructions and movie in the first post but with a couple of extra steps you've thrown in.

yep, just (re)followed the instructions but some guys don't understant when to look at the video and how to ssh to the syno 

Link to comment
Share on other sites

People all have different ways they like to learn or follow so this fits in well.

I modified the op post to link to your post.

Thanks

Link to comment
Share on other sites

I have DSM 7 installed, and Emby seems to be working ok - but should I have a user 'emby' ?  I dont.  Only my user accounts to access the NAS.
And Configuration Backup fails.
Access to the path '/volume1/@config_backup/Emby Backup - 2021-08-15 16.13.33 - Auto' is denied.
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at Emby.Server.Implementations.IO.ManagedFileSystem.CreateDirectory(String path)
at MBBackup.ServerEntryPoint.ExecuteBackup(BackupProfile settings, CancellationToken cancellationToken, IProgress`1 progress, Boolean isAuto)
at MBBackup.Entities.ScheduledBackupTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

My media is there, and things are working via Nvidia Shield, but I am lost as to whether I have other issues.
 

embyserver.txt

Link to comment
Share on other sites

Hi, What is "'/volume1/@config_backup" ?
Have you tried a different folder that you create first such as /volume1/EmbyBackup ?

No the "emby" user is the default user if you don't create/change it during setup.  So likely most people won't have it.

Link to comment
Share on other sites

Thankyou cayars.  Re a location to store Configuration Backups
I didn't know I needed to manually create a folder - I was so used to Emby having 'default' locations.
That old name would have been a carry over from DSM 6 - which is why it would not work.
I created a new folder in DSM 7 under /volume1/Emby as /ConfigBackup and when Configuration Backup is run, it creates a subfolder as Emby Backup with date and time for the backup data.
I ran Configuration Backup manually and it worked just fine.  534240168_EmbyConfigBackup.thumb.jpg.614df3f0c79558c370ef61ea51740229.jpg.

Link to comment
Share on other sites

I have completed the install of DSM 7 with Emby.
Whilst everything seems to be working ok - I wonder why I can't 'see' any files being created by EMBY on the NAS, apart from a manual folder I created for Configuration Backup.
Emby Dashbord / Logs for example.  There is a embyserver.txt dated 16/08/2021 11:03 - which I would expect to be in the Emby / Logs folder. (log attached)
Everything in the Emby folders I see is now dated / timed - before the install of DSM7 and Emby 4.6.4 for DSM 7.  I am looking at the 'old' Emby folder ?  /volume1/Emby - it is 1.34GB.
I can access the log files from the dashboard.  But I suspect something is not as it should be ?  In the log I see references to:

Data path: /var/packages/EmbyServer/var

  I dont see that path at all.  The Emby dashbord has Paths which I dont get to see ?

Paths

Cache:
/var/packages/EmbyServer/var/cache
Logs:
/var/packages/EmbyServer/var/logs
Metadata:
/var/packages/EmbyServer/var/metadata
Transcoding temporary files:
/var/packages/EmbyServer/var/transcoding-temp

embyserver.txt

Link to comment
Share on other sites

hifiaudio2

Probably a dumb question, but what do I "lose"  by not doing this migration and instead just installing DSM 7 and then the latest version of Emby and that is all?  Just things like the current status of watched vs unwatched, etc? 

  • Like 1
Link to comment
Share on other sites

@WinXP those folders look fine and are the true "unmasked" structure.

@hifiaudio2 Basically it would be a new install so you would need to rebuild libs, setup users from scratch etc and would not have any watched status.

Link to comment
Share on other sites

@cayars  When you say 'those folders look fine' - you are referring to what I can see in the Emby Dashbord I assume ?
But where do I see those folders on my Synology DiskStation ?  When I go to File Station I see the folder 'Emby' - but everything in it is dated before the upgrade.
The Emby dashbord when viewing it on my PC has logs as being at

Logs:
/var/packages/EmbyServer/var/logs
 
How do I see that location on my Synology ?  It has a location Emby > logs - and all the data in it - is dated before the DSM / Emby upgrave to V7.
I have no visible path -  /var/packages/EmbyServer
It must be there - as everything is working ok - but do I get to see it ?
Link to comment
Share on other sites

Yes to the first question.

/volume1/Emby is the DSM 6 folder path
/volume1/@appdata/EmbyServer is for DSM 7

 

Link to comment
Share on other sites

8 minutes ago, cayars said:

Yes to the first question.

/volume1/Emby is the DSM 6 folder path
/volume1/@appdata/EmbyServer is for DSM 7

 

So how do I get to actually SEE this folder -  /volume1/@appdata/EmbyServer ?

Link to comment
Share on other sites

16 minutes ago, cayars said:

SSH/Putty into the NAS.

So the whole of /volume1/@appdata/EmbyServer is not visible under DSM 7 as was the case with DSM 6 ?
You have to use SSH/PuTTY now to view the Emby package data.

And I have a DSM 6 folder - Emby - with 1.64GB sitting there doing nothing.
Did I miss something in the migration instructions that said you can delete the DSM6 Emby stuff ?

Link to comment
Share on other sites

Sure it's visible in DSM 7 via SSH with root privs.  It's not accessible via File Station however if that's what you were asking.
This is part of the new DSM 7 model.

You can remove the old Emby folder from DSM 6.

Link to comment
Share on other sites

flowcool

Hello Everyone

 

I'm facing a weird issue actually. I'm able to run Emby, read files...but cannot delete through application:

Quote

2021-08-18 10:59:20.285 Info App: Removing item from database, Type: Movie, Name: Les Aventures de Rabbi Jacob, Path: /volumeUSB1/usbshare/Video/Films/The Mad Adventures of Rabbi Jacob (1973)/The Mad Adventures of Rabbi Jacob 1973 Bluray-1080p.mkv, Id: 39917
2021-08-18 10:59:20.285 Info App: Deleting path /var/packages/EmbyServer/var/metadata/library/cc/ccfdfe33bc8f00ec68d26f5cb3f40cfe
2021-08-18 10:59:20.286 Info App: Deleting path /volumeUSB1/usbshare/Video/Films/The Mad Adventures of Rabbi Jacob (1973)
2021-08-18 10:59:20.288 Error Server: Error processing request
    *** Error Report ***
    Version: 4.6.4.0
    Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp
    Operating system: Linux version 4.4.180+ (root@build15) (gcc version 7.5.0 (GCC) ) #41890 SMP Thu Jul 15 03:43:42 CST 2021
    Framework: .NET Core 3.1.13
    OS/Process: x64/x64
    Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: /var/packages/EmbyServer/var
    Application path: /volume1/@appstore/EmbyServer/system
    System.IO.IOException: System.IO.IOException: Access to the path '/volumeUSB1/usbshare/Video/Films/The Mad Adventures of Rabbi Jacob (1973)' is denied.
       at System.IO.FileSystem.RemoveDirectoryInternal(DirectoryInfo directory, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
       at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
       at System.IO.Directory.Delete(String path, Boolean recursive)
       at Emby.Server.Implementations.IO.ManagedFileSystem.DeleteDirectoryInternal(String path, Boolean recursive, Boolean sendToRecycleBin)
       at Emby.Server.Implementations.IO.ManagedFileSystem.DeleteDirectory(String path, Boolean recursive, Boolean sendToRecycleBin)
       at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem)
       at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, Boolean notifyParentItem)
       at MediaBrowser.Api.Library.LibraryService.Delete(DeleteItems request)
       at MediaBrowser.Api.Library.LibraryService.Delete(DeleteItem request)
       at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
       at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: System.IO.FileSystem
    TargetSite: Void RemoveDirectoryInternal(System.IO.DirectoryInfo, Boolean, Boolean)


 Thing is emby system user have read/write access to my library and to Emby folder itself.

I diggued down a lot but have no clue anymore. (I even tried to make emby account owner of few directories, but still no chance)

 

Anyone else faced this ?

 

 

Edited by flowcool
adding more details
Link to comment
Share on other sites

loxxess1
On 8/16/2021 at 7:11 PM, cayars said:

Basically it would be a new install so you would need to rebuild libs, setup users from scratch etc and would not have any watched status.

@cayars You replied to hifiaudio2 that libs and users would need to be setup when installing emby server fresh in DSM 7. I don't have a lot of libraries, so for me this wouldn't be too much work. My question is would I run into issues restoring the server configuration using the config backup plugin?

Link to comment
Share on other sites

Personally if you had Emby installed on DSM 6 I would do a migration as it's going to be easier and faster than trying to restore config options and rescan everything.

Link to comment
Share on other sites

oblio999
19 hours ago, cayars said:

Personally if you had Emby installed on DSM 6 I would do a migration as it's going to be easier and faster than trying to restore config options and rescan everything.

Sorry if this has been answered before but can I do the migration steps if I upgraded to DSM7 first before shutting down Emby?

My installed version is 4.5.4.0-6

All the db files in data directory have .db-shm and .db-wal files present.

 

Link to comment
Share on other sites

If you are referring to the steps you do in SSH/putty you want to do these with Emby shutdown, otherwise it will have files locked.

After doing the copy and chown steps you can go to the new data directory and can kill the db-wal and db-shm files before starting Emby Server.

If you are still on DSM 6 you want to upgrade that install to the latest release version first before doing the migration and then use the same version package for DSM 7 after the migration.

Basically, the closer you get to following the migration guide step by step the better chance you have of success.  Follow it step by step and you should not have a problem at all and things should go smooth.

Link to comment
Share on other sites

flowcool
On 8/18/2021 at 11:05 AM, flowcool said:

Hello Everyone

 

I'm facing a weird issue actually. I'm able to run Emby, read files...but cannot delete through application:


 Thing is emby system user have read/write access to my library and to Emby folder itself.

I diggued down a lot but have no clue anymore. (I even tried to make emby account owner of few directories, but still no chance)

 

Anyone else faced this ?

 

 

Anyone have any clue ? I'm quite used to linux sysadmin, but stuck...

Link to comment
Share on other sites

Did you give the system internal emby user read/write access to these shares? (different user than was used on DSM 6).

What error shows up in the server log when you try to delete something?

Can you show us your permissions for /volumeUSB1/usbshare

Edited by cayars
Link to comment
Share on other sites

flowcool
25 minutes ago, cayars said:

Did you give the system internal emby user read/write access to these shares? (different user than was used on DSM 6).

What error shows up in the server log when you try to delete something?

Can you show us your permissions for /volumeUSB1/usbshare

 

Yep I did. and even tried to add emby user to admin group 😕

 

Please find below the permissions:

 

2021-08-19_14h59_00.png

 

Please let me know if you want me to switch DSM interface to English ;)

Edited by flowcool
typo
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...