Option to periodically sync the database to disk

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

Option to periodically sync the database to disk

Postby 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: 3488
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to periodically sync the database to disk

Postby 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: 5
Joined: Sat Apr 01, 2017 2:41 pm

Re: Option to periodically sync the database to disk

Postby 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: 3488
Joined: Fri Oct 16, 2009 11:31 pm

Re: Option to periodically sync the database to disk

Postby 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: 5
Joined: Sat Apr 01, 2017 2:41 pm

Re: Option to periodically sync the database to disk

Postby Dariush » Wed Apr 05, 2017 3:00 pm

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

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

Re: Option to periodically sync the database to disk

Postby 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: 1677
Joined: Thu Sep 03, 2009 6:48 pm

Re: Option to periodically sync the database to disk

Postby therube » Sun Apr 16, 2017 11:32 am

Perhaps, BACKUP9.EXE.

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

Re: Option to periodically sync the database to disk

Postby 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


Return to “Suggestions”