Option to periodically sync the database to disk

Have a suggestion for "Everything"? Please post it here.
Post Reply
Dariush
Posts: 6
Joined: Sat Apr 01, 2017 2:41 pm

Option to periodically sync the database to disk

Post by Dariush » Sat Apr 01, 2017 3:04 pm

From what I understand from searching this forum, Everything keeps the index in memory and syncs it to disk only when shutting down. However, I rarely shut down my computer and thus the on-disk version is frequently days out of date. I use this DB to keep track of files which were lost between two daily backups or as a pseudo-backup for files which I can easily recover from online sources, so I'm worried about losing data if a disk dies and crashes my computer, since Everything will not be able to sync the updated file list. Due to this I'd like to request an option to set a schedule (or at least a frequency) at which Everything.db on disk will be updated - e.g. every hour, or every day at 13:00 and 20:00.

void
Site Admin
Posts: 4769
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to periodically sync the database to disk

Post by void » Sun Apr 02, 2017 5:04 am

I'll consider adding this to Everything, so it is done automatically.

For now, you can create a scheduled task and run Everything.exe with the -update command line option:
Everything.exe -update

The -update command line option will write the database to disk.

Dariush
Posts: 6
Joined: Sat Apr 01, 2017 2:41 pm

Re: Option to periodically sync the database to disk

Post by Dariush » Sun Apr 02, 2017 12:13 pm

Thanks for the tip, this (plus '-startup') did almost exactly what I wanted (the only minor downside is the Task Scheduler launching Everything if I have it closed).

void
Site Admin
Posts: 4769
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to periodically sync the database to disk

Post by void » Wed Apr 05, 2017 7:46 am

Please try using the command line option -no-first-instance:
Everything.exe -update -no-first-instance

This will only save the database to disk if Everything is already running.

Dariush
Posts: 6
Joined: Sat Apr 01, 2017 2:41 pm

Re: Option to periodically sync the database to disk

Post by Dariush » Wed Apr 05, 2017 3:00 pm

…Thanks for the tip, this did exactly what I wanted. :D

Stamimail
Posts: 692
Joined: Sat Aug 31, 2013 9:05 pm

Re: Option to periodically sync the database to disk

Post by Stamimail » Sun Apr 16, 2017 10:57 am

Is there a possibilty to save the db file to other folder and to name it by a date? so that the user will be able to set a command in tasks schedular, to save a db file every day/week and so make an archive/log of db files. Something like:

2017-04-16 2200.db
2017-04-17 2200.db
2017-04-18 2200.db
2017-04-19 2200.db
2017-04-20 2200.db
...

therube
Posts: 2270
Joined: Thu Sep 03, 2009 6:48 pm

Re: Option to periodically sync the database to disk

Post by therube » Sun Apr 16, 2017 11:32 am

Perhaps, BACKUP9.EXE.

Stamimail
Posts: 692
Joined: Sat Aug 31, 2013 9:05 pm

Re: Option to periodically sync the database to disk

Post by Stamimail » Fri May 05, 2017 8:52 am

therube wrote:Perhaps, BACKUP9.EXE.
This solution is based on using Everything daily. But what about if the user doesn't use Everything daily, and he just wants to run a bat file that will do something like this:
  • Run Everything in background for a moment
  • Copy/Export the new database to <CurrentDateHour>.db/.csv/.txt/.efu
  • Exit Everything

Link
Posts: 16
Joined: Thu Nov 03, 2011 10:08 pm

Re: Option to periodically sync the database to disk

Post by Link » Fri Jan 04, 2019 3:03 pm

I'm interested in this feature. I rarely shutdown my computer so if the computer unexpectedly lose power or similar then I'll end up with a very old database so I'm unable to see what files were for example on my ram drive or if Iost some recent files on my normal harddrives.

Having a script that restart everything isn't an option since I have constantly several search windows open and in use, a restart will make them disappear.

Can you please add this option?

void
Site Admin
Posts: 4769
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to periodically sync the database to disk

Post by void » Sat Jan 05, 2019 4:01 am

I want to avoid writing to the disk. However, the next major version of Everything will provide options to save the index to disk at a specific interval.

The next major version of Everything will also save the database to disk when you close an Everything Search window after 24 hours has elapsed from starting Everything or last saving the database to disk.

Please try making your script run:
Everything.exe -update

This should save your Everything database to disk without closing Everything.

Post Reply