Page 1 of 1

Option to periodically sync the database to disk

Posted: Sat Apr 01, 2017 3:04 pm
by Dariush
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.

Re: Option to periodically sync the database to disk

Posted: Sun Apr 02, 2017 5:04 am
by void
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.

Re: Option to periodically sync the database to disk

Posted: Sun Apr 02, 2017 12:13 pm
by Dariush
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).

Re: Option to periodically sync the database to disk

Posted: Wed Apr 05, 2017 7:46 am
by void
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.

Re: Option to periodically sync the database to disk

Posted: Wed Apr 05, 2017 3:00 pm
by Dariush
…Thanks for the tip, this did exactly what I wanted. :D

Re: Option to periodically sync the database to disk

Posted: Sun Apr 16, 2017 10:57 am
by Stamimail
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
...

Re: Option to periodically sync the database to disk

Posted: Sun Apr 16, 2017 11:32 am
by therube
Perhaps, BACKUP9.EXE.

Re: Option to periodically sync the database to disk

Posted: Fri May 05, 2017 8:52 am
by Stamimail
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

Re: Option to periodically sync the database to disk

Posted: Fri Jan 04, 2019 3:03 pm
by Link
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?

Re: Option to periodically sync the database to disk

Posted: Sat Jan 05, 2019 4:01 am
by void
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.