Backup Databases Failed

Server Version#: 1.24.1.4931
Player Version#: 1.33.0.2444-a220eae4

Hello

I would have the next problem.

always receives the next message lately:

the database on (my server) failed to backup
the database on (my server) was not found to be corrupt

i have qnap plex server. what can i do to make it work?

Thanks in advance for the help

Plex Media Server Logs_2021-08-22_10-15-52.zip (4.1 MB)

I put it out a month ago and no one has tried to help since, sad!

If your database is corrupted you can attempt to repair it.
Given it’s running on a NAS you can either connect to the NAS via SSH to run the commands or create a dummy install of Plex on your main PC to use its executables with the database files from the NAS itself.

Hello.

thanks for the reply.

Unfortunately for me it’s so Chinese I don’t understand. i would need more help. I have a mac, but the Plex Server is running on QNAP!

what to do?

Preparation

  1. stop the Plex Media Server

  2. open Terminal on your Mac

  3. enter ssh <QNAP account>@<QNAP IP>, replacing <QNAP account> with the name of your QNAP account and <QNAP IP> with the local IP address of your QNAP

  4. enter the password of your QNAP account when requested

  5. execute the command getcfg -f /etc/config/qpkg.conf PlexMediaServer Install_path – this will give you the actual path of the Plex Media Server on your QNAP (the path will vary depending on which system you have).
    Example: /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/

Based on the given example:

  • the SQLite app will be located in /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex SQLite.
  • the database file will be located in /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases/

Repairing the database

  1. execute cd "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases/" to navigate to the location of the database (using the actual pass derived during the preparation

  2. execute cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original to create a copy of the database (so in case something goes wrong you can still revert back to that version

  3. execute /share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex\ SQLite com.plexapp.plugins.librrary.db ".output recover.out" ".recover" to attempt automatically repairing the database.
    Notice the \ in the previous command to escape the <space> in the executable name (Plex SQLitePlex\ SQLite) – without that, your QNAP/Terminal will think SQLite is part of the parameters you want to send to an application named Plex – which doesn’t exist).

Keep in mind the database can be so badly corrupted, Plex might not be able to repair it. In that case your next steps could be to attempt restoring the last available backup. This way you will lose all changes made to the library since the last successful backup.
If that doesn’t help you can delete the database file. With that, Plex will start over with a near-new server configuration (keeping most of your config but none of your libraries / data).

I can’t even enter through a terminal! and on qnap I turned on SSH. QNAP account is what? your username, device name, email address? I’m already stuck here, so I said Chinese to me :laughing:

so far i got it! I won’t get any further from here.

Will Q exit the connection to the QNAP (returning to the Mac’s shell) or simply exit the “Console Management - Main menu”?

Ohh thx.

and how from here on, I do not understand !?

commands should be the same as listed above (the paths match those from the examples:

cd "/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases/"
cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
/share/CACHEDEV1_DATA/.qpkg/PlexMediaServer/Plex\ SQLite com.plexapp.plugins.librrary.db ".output recover.out" ".recover"

just like that I typed them in and it goes in. does it run into the background? can i close smoothly? how do i know if the operation was successful?

It’s 3 separate commands you need to run after each other. From the looks you copy & pasted a fraction from all 3 lines?!

yes i just extracted them all and just pasted them. I always printed an enter between them!

Dont work form me!! Can you help everyone for me?

i don’t want to reinstall again.

the problem is not always solved! can anyone help?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.