Jump to content

Backup fails every night


Go to solution Solved by Neminem,

Recommended Posts

Posted

I recently moved to EmbyServer from Binhex containers on Unraid - no way to get transcoding working on Binhex that I could find. The official container just worked, great.

Backups are not working though, there seems to be a permissions error. I have read a few post here about checking permissions and to be honest Luke says to check permissions, but I dont have a clue how to. I was here earlier looking for information on this and found a topic about unraid. One of the first posts was to change Key 1 and Key 2 in the docker install file to be 99/100 instead of 2 and 2. I tried that and I broke all client access and my access from the unraid docker container page. I set back to 2 and 2 and all is working again.

Could anyone give me some tips about why backup fails after 30 seconds. I know I should upload a log, but which one? 

Running 4.8.10.0 on unraid 7, but backups were not working on the previous unraid version either. I did restore from the binhex-emby  backup to EmbyServer, so I guess the location is readable, but not writable? What do these keys 1 2 and 3 in the docker install script acually mean? Most templates have 99 and 100. What is up with these being 2 and 2.

I am not Linux savvy, so any help, very simply explained would be most appreciated!

Meantime, would app backups protect me from a total Fubar? I guess they would, but I don't like seeing errors. All plugins are up to date as well, just to say.

any suggestions would be much appreciated,

Thanks!

Posted

I am attaching 2 logs which are the most recent ones i think. Everything is working except backups, which fail every night about 40ish seconds after the scheduler starts.

I'm sure it is a permissions issue - I tried to add a user Emby to the users on unraid but that didn't do anything. I had to revert to Key 1 2 and 3 in the template to 2 or else I wasnt able to use Emby on any firesticks, nor access the docker container from Unraid.

Thanks

Ianm

embyserver-63872895590.txt embyserver.txt

Posted

You need to look at your permissions of your media folders and I suspect also your backup folder.

Media files show this.

System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/media/movies/Come and Find Me/Come and Find Me.nfo' is denied.

Backup plugin shows this.

Spoiler

rror    *** Error Report ***
    Version: 4.8.10.0
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.6.68-Unraid (root@Develop) (gcc (GCC) 14.2.0, GNU ld version 2.43.1-slack151) #1 SMP PREEMPT_DYNAMIC Tue Dec 31 13:42:37 PST 2024
    Framework: .NET 6.0.31
    OS/Process: x64/x64
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 12
    Data path: /config
    Application path: /system
    System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/files/Backups/EmbyServer/embyserver-backup-full/data/authentication.db' is denied.
     ---> System.IO.IOException: Permission denied
       --- End of inner exception stack trace ---
       at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func`2 errorRewriter)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
       at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
       at Emby.Server.Implementations.ApplicationHost.BackupDatabases(String destinationFolder)
       at MBBackup.ServerEntryPoint.ExecuteBackup(PluginConfiguration configuration, CancellationToken cancellationToken, IProgress`1 progress)
       at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
    Source: System.Private.CoreLib
    TargetSite: Void CheckIo(Error, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo])
    InnerException: System.IO.IOException: Permission denied

Your appdata store also shows permission issues

System.IO.FileNotFoundException: System.IO.FileNotFoundException: Could not find file '/config/data/connect.txt'.

So all in all you need to fix your permissions.

 

 

Posted (edited)

And here is the dashboard error. My keyboard has no printscreen key, so took a while.

 

I have looked on the forum, but I am completely unable to find anything about how to fix permissions. Is this something I need to do in Unraid, or in Emby, or both?

I don't want to make the media folder public in case of accidental deletions. But i will do obviously if that is the fix? At the moment app data is set to Private on SMB and NFS, only my username has ability to read write.

The backup folder is set to NFS secure and SMB all users have read write except guest read only. I have emby as a user set to read write as well.

 

Dashboard.pdf

Edited by ianmcleish
Limited to when I can post
  • Solution
Posted

Well you need to change permissions in unRaid so Emby can read / write to your backup folder.

Also it looks like you have enabled nfo write in you media folders, that also errors with permision denied.

It also look like your appdata folder has permission errors.

Posted

Just one more, I see in appdata that EmbyServer is set to owner daemon. All other folders set either to nobody or root. I didn't set it like that and there is no user called daemon.

Should I change ownership to root or nobody?

Posted

You can try, that helped me before I nuked the appdata store, and started using 99 / 100 permissions.

 

 

 

Posted

I left the owner at daemon cos I didn't want to break anything. I just changed permissions on both folders - appdata and /data (Using Trash's folder structure) to have full permissions for everything and it worked. Perhaps not the most secure solution, I don't know, but it worked. Well at least the backup. I wasn't aware of the issue writing nfo s to the media folder, I will check the logs to see if that one persists, but I doubt it.

 

Thanks for all the help and suggestions.

Posted

Np, happy to hear it worked out for you 😁

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...