Auto database backups

Have a suggestion for "Everything"? Please post it here.
Post Reply
Knowbody
Posts: 3
Joined: Thu Sep 08, 2016 12:59 am

Auto database backups

Post by Knowbody »

Here's what I think Everything should do:
• Automatically create a backup of the database periodically (say, once per day, or after rebuilding), with the date stamp in the file name.
• Detect if the database is broken, and automatically revert to the latest backup if it is.
• Limit the number of backups it keeps - because old, stale data isn't useful. Maybe it only needs one or two backups.
• Possibly rename the broken database to something like Everything.broken.1.db
therube
Posts: 5058
Joined: Thu Sep 03, 2009 6:48 pm

Re: Auto database backups

Post by therube »

What is to determine, or how does one determine what is a "broken database"?


As far as backup, something like, BACKUP9, either run manually, or as a scheduled task would be sufficient I'd think.
(Or simply a batch file using COPY to do similar.)

Likewise you could include other files that may hold some importance to you in the backups.
Perhaps Everything.ini, *.csv, *.efu ...
Knowbody
Posts: 3
Joined: Thu Sep 08, 2016 12:59 am

Re: Auto database backups

Post by Knowbody »

Well, I've had Everything refuse to run because the database is broken, and had to delete it and reindex everything - which is over 20TB of data in my case.
I was thinking of writing a batch or python script to back it up and schedule it to run with windows task scheduler, but it would be nice to have this functionality inbuilt.
void
Developer
Posts: 17157
Joined: Fri Oct 16, 2009 11:31 pm

Re: Auto database backups

Post by void »

Well, I've had Everything refuse to run because the database is broken
Is Everything trying to reindex, or is Everything hanging or crashing?
What version of Everything are you using?
Automatically create a backup of the database periodically
It would be better if the database never broke.
Everything quickly tries to verify the integrity of the database when it is loaded from disk.
It is quick and may miss some issues. If Everything does find an issue it will rebuild the database, which can take some time..

Everything continues to monitor the integrity of the database while it is running.

Corrupt NTFS FRN's can cause all sorts of issues, so please backup anything important and check your NTFS volumes for errors.

Another issue that might occur is on system shutdown, Everything may be taking to long to save the database to disk, the system may end up terminating Everything and truncating the database.

Please try running Everything in debug mode.
Any detected issues when loading the database are reported in the debug console.
Knowbody
Posts: 3
Joined: Thu Sep 08, 2016 12:59 am

Re: Auto database backups

Post by Knowbody »

void wrote:
Well, I've had Everything refuse to run because the database is broken
Is Everything trying to reindex, or is Everything hanging or crashing?
What version of Everything are you using?
I'm not sure what version it was, it was a few of months ago.
But it just threw an error message when I tried to run Everything and it just refused to run, and deleting the Everything.db fixed it.
So I've been manually copying the Everything database to back it up periodically in case it breaks again.

But yes, ideally a database shouldn't break. But you know, Murphy's law and all. Often reliability is just a matter of redundancy.

My main system drive is a Samsung 950 Pro M2 using NVMe, so saving the database file shouldn't take very long with its >1GB/s write speed.
Post Reply