Jump to content

Option to not remove lirbary items if library storage is offline


Recommended Posts

Posted

Are there any options to not remove library items if for instance a network storage is offline when the library is scanned?

Posted

Hi, we don't do this intentionally. If you're experiencing a problem please go over an example and attach the emby server log. Thanks 

Posted

Well, I don't know exactly what happened, but NAS was totally unresponsible the other thay, and during that time Emby did on or more scheduled media scan.

And after the media scan everything from the NAS was gone from the Emby media library, and when the NAS was online again verything was scanned from scratch which took about 26 hours, for the 3000 movies, 16 000 TV episodes, and about 175 000 songs.

It would be nice if that didn't happen again.

 

I restarted the emby server when the NAS was back online so it could mount the media shares again, so I don't think I have any relevant logs.

Posted

Ok if it happens again then please attach the emby server log. thanks.

  • 2 weeks later...
Posted

I've thought about this for a bit.

 I guess this is happening because I mount the NAS share to a mount point on my Emby server. I need to do this becaus I use rar2fs on my Emby server to be able to acces biles stored in RAR-archives.

And even if the NAS becomes unreachable the mount point is till accessable but will show up as a empty folder, and therfore Emby will clean upp its library.

Or what do you think?  

 

If this is the case it would be really nice with an option to not automatically clear Emby libray when scanning an empty library folder, and also an option to manually do so.

Posted
Quote

And even if the NAS becomes unreachable the mount point is till accessable but will show up as a empty folder, and therfore Emby will clean upp its library.

HI, yes this probably fools Emby into thinking that it's online but you've deleted the contents.

Posted

I think this is a quite common setup, so it would be really nice to have an aption to turn off the autocleaning of the library  and give the users the option to manually clean the library.

But I guess the quickest way to restore the lost  library content if this happens again is to use the "Server Configuration Backup" plugin?

Posted

Or the autoclean would not activate if there is more than x% difference. or give some kind of warning 'are you sure ....'

  • Like 2
Posted
22 minutes ago, Flipho said:

Or the autoclean would not activate if there is more than x% difference. or give some kind of warning 'are you sure ....'

That's also a way to do it, even if the warnings wouldn't help much when it's a scheduled library scan.

Posted

Ofcourse only a warning wouldnt fix anything. So maybe a threshold we could enter next to the "Enable real time monitoring" option each library has. Would an autoclean delete more than x% the process shouldnt start,.

Posted
23 minutes ago, Flipho said:

Ofcourse only a warning wouldnt fix anything. So maybe a threshold we could enter next to the "Enable real time monitoring" option each library has. Would an autoclean delete more than x% the process shouldnt start,.

Sure, but I think it would meke more sense to simply have a option where you enable or disable automatic lirbrary cleaning, and also a button to manually do a cleaning job.

  • 2 weeks later...
Posted
On 1/15/2021 at 9:04 AM, gberg said:

Sure, but I think it would meke more sense to simply have a option where you enable or disable automatic lirbrary cleaning, and also a button to manually do a cleaning job.

If there's no other way, yes, but I would think we should be able to work on detecting it.

Posted
On 1/24/2021 at 12:54 AM, Luke said:

If there's no other way, yes, but I would think we should be able to work on detecting it.

Ok, so you are working on a fix for this?

  • 3 weeks later...
Posted

Can you please attach the emby server log from when this happens? Thanks.

CharleyVarrick
Posted (edited)
On 1/15/2021 at 6:30 AM, Flipho said:

Or the autoclean would not activate if there is more than x% difference. or give some kind of warning 'are you sure ....'

I've seen a similar feature in FreeFileSync; analysis starts but then pauses and prompt user with something to the effect of:

" Are you sure you want to proceed, as the difference between A and B is abnormally high..."

That would be a GREAT Emby safety net for when hardware fails.

Edited by jlr19
Posted
16 hours ago, Luke said:

Can you please attach the emby server log from when this happens? Thanks.

As I said, when it happens I restarted the Emby server VM  to to mount the share again. And therefore I don't have any log.

  • 1 year later...
Posted

Just checking in to see if there have been any development on this topic?

Posted
3 hours ago, gberg said:

Just checking in to see if there have been any development on this topic?

Hi, we don't remove library items if storage is offline.

Posted
13 hours ago, Luke said:

Hi, we don't remove library items if storage is offline.

Yes, I understand.

 

But As I explained furhter up in this thread about a year ago this happens when you mount a remote share to a linux folder.

Then if the remote share somhow is unavailable the linux folder which the remote share should be mounted to is still accessabe but wil show as empty.

And this will mean Emby will remove the content that was previuously accesseable int folder, and therefore it would be really great if the was a option to not automatically clean the library, and also a way to manually clean the library.

 

I learned to deal with this by simply restore a backup of the vitrual machine which runs the Emby server when this happens, but it's not a very elegant solution.

  • 3 weeks later...
Posted
On 12/22/2022 at 2:05 AM, gberg said:

Yes, I understand.

 

But As I explained furhter up in this thread about a year ago this happens when you mount a remote share to a linux folder.

Then if the remote share somhow is unavailable the linux folder which the remote share should be mounted to is still accessabe but wil show as empty.

And this will mean Emby will remove the content that was previuously accesseable int folder, and therefore it would be really great if the was a option to not automatically clean the library, and also a way to manually clean the library.

 

I learned to deal with this by simply restore a backup of the vitrual machine which runs the Emby server when this happens, but it's not a very elegant solution.

OK. There's a chance that won't happen anymore in the upcoming 4.8 release, due to other changes.

Posted
7 hours ago, Luke said:

OK. There's a chance that won't happen anymore in the upcoming 4.8 release, due to other changes.

Ok, that sounds good, any ideas when it's being released?

And also, will this realease include the updated Trakt plugin so that users themselves set up trakt rather than the server admin.

Posted

No eta and yes it will.

  • 1 year later...
bguscott
Posted

Any updates here? I'm on 4.8.8 and experiencing this behaviour.

darkassassin07
Posted

This behaviour hasn't changed really, but you can easily work with it to achieve what you want. It's all about how you structure your media folders:

 

Within the share you mount, you should have another folder that then contains your media folders, such as:

//sharename/media/movies/<movies>

//sharename/media/tvshows/<tvshows>

On the emby host, you want to mount the /media portion wherever (say /mnt/media for example), with the /movies and /tvshows folders within being created and removed by the mount. When unmounted, those two folders should disappear leaving an empty /mnt/media folder.

From here, if you add the folder /mnt/media/tvshows to emby, and then the share gets dismounted; emby will see that folder missing entirely instead of being empty; so it will not remove the media from your libraries.

 

This is exactly what I do, as my media is mounted via samba. Works great.

  • Like 1
Posted
3 hours ago, bguscott said:

Any updates here? I'm on 4.8.8 and experiencing this behaviour.

Hi there @bguscottcan we please look at a specific example of your issue:
 

Thanks !

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