Jump to content

Backup and restore plug-in


RickElferink

Recommended Posts

RickElferink

Backup and restore plugin fails since 1 day.
Emby server 4.8.1.0 (and 4.8.0.10 also) on Synology
Backup & Restore plugin 1.6.1.0

Message on dashboard:
Access to the path is denied. at Interop.ThrowExceptionForIoErrno (Interop+ErrorInfo errorInfo, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x00014] in <887d52df94a649318d9d6394bdacbad6>:0 at Interop.CheckIo (System.Int64 result, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x0000a] in... etc

Everything ran nicely until yesterday. As a test I changed permissions on the backup location to read-write for users-groups-others but still the backup cannot be made (|I run it from the Scheduled tasks).
Is there an issue with the plugin or Emby server version? Like to hear from you!

Link to comment
Share on other sites

kjhedges

Current Backup Info

Backup Date
09/02/2024, 00:11:43
Server Version
4.8.1.0
Backup Plugin Version
1.6.1.0
 
Mine seems to be all good. Linux server.
Link to comment
Share on other sites

Hi,  have you taken a look this guide for Synology?

It's about adding a library, but the permissions portion of it may help you resolve this.

Link to comment
Share on other sites

RickElferink

On Synology nothing has changed for weeks, except setting rwxrwxrwx to the backup directory and files after the backup started to fail.
Backup fails since update Emby Server to 4.8.0. Now on 4.8.1.0.

usbshare1.jpg

Link to comment
Share on other sites

5 hours ago, RickElferink said:

On Synology nothing has changed for weeks, except setting rwxrwxrwx to the backup directory and files after the backup started to fail.
Backup fails since update Emby Server to 4.8.0. Now on 4.8.1.0.

usbshare1.jpg

Did you check the permissions recursively because the error seems to have happened on a subfolder.

Link to comment
Share on other sites

RickElferink

All permissions recursively on rwxrwxrwx (and of course I checked again 🙂 ).

Link to comment
Share on other sites

9 hours ago, RickElferink said:

All permissions recursively on rwxrwxrwx (and of course I checked again 🙂 ).

How did you check?

Link to comment
Share on other sites

RickElferink

With my 40+ years of hands-on experience in IT 🙂
Jokes aside: with Synology file explorer and also on command line.
The USB drive is accessible. Synology Hyperbackup is reading and writing without problems.

Problem still exists. Since update to Emby server 4.8.

 

Link to comment
Share on other sites

RickElferink

ssh to Synology NAS
cd to shared path
ls -l
cd following path to all backups
and every time ls -l
Permissions all rwxrwxrwx
This was one of the first things I checked. Even reset all permissions using the Synology file explorer (including sub-paths and files of course).
And as I am an IT professional working with Unix since 1981 I then checked again with ssh and ls -l.

Does this answer your question?

Link to comment
Share on other sites

OK, I do believe you, however that doesn't lead us any closer to a solution as the copy file attempts are still throwing access denied errors.

Can you try creating a backups folder underneath /var/packages/EmbyServer/var

Then for this new folder, set that as your backup location. Does the backup succeed?

Link to comment
Share on other sites

TallBoiDez

@LukeI Have to recreate my emby server and I noticed that the backup & restore plugin doesn't allow me to choose what I want to restore anymore all I want to restore is the user data (watch history, favorites etc...), and plugins is it still possible for me to do that

Link to comment
Share on other sites

Happy2Play
5 minutes ago, TallBoiDez said:

@LukeI Have to recreate my emby server and I noticed that the backup & restore plugin doesn't allow me to choose what I want to restore anymore all I want to restore is the user data (watch history, favorites etc...), and plugins is it still possible for me to do that

Said to be added in a future update in other topics.  Right now would require the Legacy Backup plugin also found in first post.  But isn't quite the same as it does not restore USERS and userdata, just userdata.

But am confused as restore would have restored the databases already having this info.

Edited by Happy2Play
Link to comment
Share on other sites

TallBoiDez
5 minutes ago, Happy2Play said:

Said to be added in a future update in other topics.  Right now would require the Legacy Backup plugin also found in first post.  But isn't quite the same as it does not restore USERS and userdata, just userdata.

But am confused as restore would have restored the databases already having this info.

As of rn when i use the plugin it causes problems with my server one being that the plugin catalog never loads up

Link to comment
Share on other sites

Happy2Play
6 minutes ago, TallBoiDez said:

As of rn when i use the plugin it causes problems with my server one being that the plugin catalog never loads up

Doesn't sound like there is a current option then.  

If you know databases I guess you could try to export the userdatas table from old db into new db.  But will need to ensure you copy the users.db from old to new also.

Link to comment
Share on other sites

32 minutes ago, TallBoiDez said:

As of rn when i use the plugin it causes problems with my server one being that the plugin catalog never loads up

Let's look at an example of your issue:

Thanks.

Link to comment
Share on other sites

RickElferink
On 2/21/2024 at 12:48 AM, Luke said:

OK, I do believe you, however that doesn't lead us any closer to a solution as the copy file attempts are still throwing access denied errors.

Can you try creating a backups folder underneath /var/packages/EmbyServer/var

Then for this new folder, set that as your backup location. Does the backup succeed?

I will try this as soon as I am home again!!
And let you know the outcome of course.

  • Thanks 1
Link to comment
Share on other sites

RickElferink

Created a folder /var/packages/EmbyServer/var/Backups.
Set backup/restore plugin to use that directory.
Started a backup: embyserver-full-backup directory and files in it were created. Backup successfull.

Then:
Created a ne directory on the USB disk: /volumeUSB1/usbshare/Backups/emby.
Set backup/restore plugin to use that directory. The emby gui allows you to select it.
Started a backup:
embyserver-full-backup disrectory and subdirectories were created.
Also files in those directories are created: but all have filesize 0 bytes. And backup fails!!

From the ssh session:


synadm@dtc1n001:/$ cd /volumeUSB1/usbshare/Backups
synadm@dtc1n001:/volumeUSB1/usbshare/Backups$ cd emby
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby$ ls -l
total 4
drwxrwxrwx 1 admin users 4096 Feb 25 11:45 embyserver-backup-full
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby$ du -ms *
1       embyserver-backup-full
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby$ ls -l
total 4
drwxrwxrwx 1 admin users 4096 Feb 25 11:45 embyserver-backup-full
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby$ cd embyserver-backup-full
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby/embyserver-backup-full$ ls -l
total 12
drwxrwxrwx 1 admin users 4096 Feb 25 11:44 config
drwxrwxrwx 1 admin users 4096 Feb 25 11:45 data
drwxrwxrwx 1 admin users 4096 Feb 25 11:45 metadata
drwxrwxrwx 1 admin users    0 Feb 25 11:44 plugins
drwxrwxrwx 1 admin users    0 Feb 25 11:44 root
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby/embyserver-backup-full$ cd data
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby/embyserver-backup-full/data$ ls -l
total 4
-rwxrwxrwx 1 admin users    0 Feb 25 11:45 connect.txt
-rwxrwxrwx 1 admin users    0 Feb 25 11:45 device.txt
-rwxrwxrwx 1 admin users    0 Feb 25 11:45 library.db
drwxrwxrwx 1 admin users    0 Feb 25 11:45 livetv
drwxrwxrwx 1 admin users 4096 Feb 25 11:45 playlists
drwxrwxrwx 1 admin users    0 Feb 25 11:45 userplaylists
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby/embyserver-backup-full/data$ cd playlists
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby/embyserver-backup-full/data/playlists$ cd *Family*
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby/embyserver-backup-full/data/playlists/To Watch (Family) [playlist]$ ls -l
total 0
-rwxrwxrwx 1 admin users 0 Feb 25 11:45  fanart.jpg
-rwxrwxrwx 1 admin users 0 Feb 25 11:45  playlist.xml
-rwxrwxrwx 1 admin users 0 Feb 25 11:45 'To Watch (Family).m3u'
synadm@dtc1n001:/volumeUSB1/usbshare/Backups/emby/embyserver-backup-full/data/playlists/To Watch (Family) [playlist]$

And the logging from the failed backup:
Access to the path is denied. at Interop.ThrowExceptionForIoErrno (Interop+ErrorInfo errorInfo, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x00014] in <887d52df94a649318d9d6394bdacbad6>:0 at Interop.CheckIo (System.Int64 result, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x0000a] in <887d52df94a649318d9d6394bdacbad6>:0 at Interop.CheckIo (System.Int32 result, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x00000] in <887d52df94a649318d9d6394bdacbad6>:0 at System.IO.FileSystem.CopyFile (System.String sourceFullPath, System.String destFullPath, System.Boolean overwrite) [0x0005c] in <887d52df94a649318d9d6394bdacbad6>:0 at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x00062] in <887d52df94a649318d9d6394bdacbad6>:0 at Emby.Server.Implementations.IO.ManagedFileSystem.CopyFile (System.String source, System.String target, System.Boolean overwrite) [0x00038] in <0cac6f1e304b4694a4618d07c28f0b16>:0 at Emby.Server.Implementations.ApplicationHost.BackupDatabases (System.String destinationFolder) [0x000ca] in <0cac6f1e304b4694a4618d07c28f0b16>:0 at MBBackup.ServerEntryPoint.ExecuteBackup (MBBackup.Configuration.PluginConfiguration configuration, System.Threading.CancellationToken cancellationToken, System.IProgress`1[T] progress) [0x003e6] in :0 at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal (MediaBrowser.Model.Tasks.TaskOptions options) [0x00258] in <0cac6f1e304b4694a4618d07c28f0b16>:0

I assume that if the plugin can create files and directories (with rwxrwxrwx permissions) so it has read-write access. Files cannot be filled with data.
This worked fine until the Emby server update to 4.8.1.0 (I still have old backups to prove it 🙂 ).
So there is a workaround to create backups on the local Synology disk, but of course a bachup should be on another medium, like before.
I hope all this info is clear and that there is a solution. Thanks in advance!

Link to comment
Share on other sites

@RickElferinkit looks like the server is just being denied write access, but please attach the emby server log from the backup attempt for review.

Link to comment
Share on other sites

  • 2 weeks later...
RickElferink
Posted (edited)

Sorry for the delay (not at home is no admin access).
Emby server is updated to 4.8.1.0. Backup still fails.
Server logfile attached.

embyserver.txt

Edited by RickElferink
Link to comment
Share on other sites

Hi, yes that confirms is. Please try changing the backup folder destination to:

/var/packages/EmbyServer/var/backups

Does that succeed?

Link to comment
Share on other sites

RickElferink

Backup to 'local' directory did succeed before. If I have time I will try to copy or move them to the USB share manually and see if that succeeds. Will keep you informed.

  • Thanks 1
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...