Jump to content

Making a copy of library.db


Go to solution Solved by Neminem,

Recommended Posts

Posted

I have been making a copy of library.db every hour to query with sqlite3. I read, somewhere today, that one should shutdown emby before making a copy but the article was old.

Is it safe to do what I've been doing? Or do I need to  make a daily copy in the middle of the night when it's not being used, having shut it down.

What are the dangers of copying the database when it's running?

Thanks

  • Solution
Neminem
Posted (edited)

If you look at you DB library you see some sqlite files outside you DB.

These are cache files, waiting to be written to db, that is done on proper shutdown.

image.png.baf4e53193360dee55e2096f64c62a46.png

Without them written back to you DB will lead to issues, down the line.

This is the nature of SQLite, and if you ever hade the intension of moving the DB to a Network share.

Just dont.... 

 

 

Edited by Neminem
Posted

Ok thank you. I'd better have a look at the API then.

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