View Single Post
  #15  
Old July 7th 19, 02:53 AM posted to alt.comp.os.windows-10
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Close Firefox before backing up my Profile.

T wrote:
On 7/6/19 10:31 AM, Paul wrote:
Andy Burns wrote:
Paul wrote:

Applications which are "VSS aware" work perfectly fine.

sqlite is blissfully unaware of VSS, so you'll get 'crash consistent'
copies taken while the db file is open, not sure why the backup would
think it needed to wait?


VSS manages a certain phase of the backup.

1) Request comes into VSS - "Make a shadow of C: please"
2) VSS sends command to running applications to quiesce.
3) Waits ten seconds for compliance.
4) Anything not answering, doesn't get backed up properly.
5) Results may be reflected in VSS status interface.

https://www.sqlite.org/howtocorrupt.html

"Backup or restore while a transaction is active

Systems that run automatic backups in the background might
try to make a backup copy of an SQLite database file while
it is in the middle of a transaction. The backup copy then
might contain some old and some new content, and thus be corrupt.

The best approach to make reliable backup copies of an
SQLite database is to make use of the backup API
that is part of the SQLite library."

https://www.sqlite.org/backup.html

My guess would be, Firefox would need to intercept a VSS
request, and convert it into a Backup API sequence.
Or something.

Paul


Hi Paul,

I am thinking a this point the best approach is a
pre-event script:

Taskkill /IM firefox.exe
wait five seconds
Taskkill /IM firefox.exe /F

and thuderbird and chrome and quickbooks, etc..

Thank you for the education. You are an excellent teacher.
I did not realize that VSS had such limitations.

-T


VSS is, in a sense, a "cooperative" system. It delivers
a hint to your program. If you listen and behave in a
certain way, your "goods" get properly backed up.

No home programmer puts a VSS handler in their
code, because if a home programmer makes a program,
they probably "exit" before doing their backup.

With "scheduled" backups, I suppose it could be
different, because the human may not be present
for "cleanup".

Databases (especially the standalone big ones) are
inherently difficult customers to deal with. It's
never going to go well with them. But the way that
Firefox uses sqlite, has possibilities. Firefox is
not a five-nines server. It can afford to shut off
the databases, flush them, for short intervals. And
it should be possible to make it play nice. Once the
shadow copy is made, of a snapshot-in-time, the
backup program then can back up the shadow "snapshot"
at its leisure. That's the beauty of the ten second
interval. Be quiet for ten seconds, close the file,
"Click" goes the snapshot, now open your file again
and continue on. Once VSS makes the snapshot, that's
the limit of the intrusion.

Thunderbird is more problematic, in that seemingly
random stuff happens in there. There is less "order"
in a Thunderbird universe, at least to my
"observer eye". The more modern the version of
Thunderbird, the more wacky the behavior. I could
well imagine Thunderbird lighting up some sqlites
in the middle of a VSS call. Just because it has
no internal synchronization primitives. If you
ever watch the random order of the newsgroups it
works on, you'll get the idea.

Paul
Ads