Windows: Locked files (outlook) not copied

Get help for specific problems
Posts: 9
Joined: 17 Jul 2017

petur

After a sync there's an error box telling me some files were not synced, and those are outlook files. There is no other error coming up.

Verified that volume shadow service is running
FFS is started as admin
Windows 10 (sadly)

When outlook doesn't run the copy works. But this setup will get automated so it will need to deal with this in the end.

Any hints on how to debug this issue?


thanks!
Posts: 9
Joined: 17 Jul 2017

petur

Yes, and I think it doesn't apply to Win10, as stated in the KB:
Note This article is not for use with Windows Vista, with Windows Server 2008, or with later operating systems. Starting with Windows Vista and with Windows Server 2008, Windows component installation is manifest based. If you try to manually register specific components, such as those that are described in this "Resolution" section, in the operating systems that are mentioned in this note, unexpected results may occur that may require reinstalling Windows to resolve.
Posts: 292
Joined: 13 Apr 2017

Gianni1962

Sorry, I mean only the first part where states you need to configure FFS and run it as Administrator.
Posts: 9
Joined: 17 Jul 2017

petur

yes, FFS is configured correctly in the options, and started as admin (using right-click, and the windows security question comes up as expected)
Posts: 292
Joined: 13 Apr 2017

Gianni1962

Ops, seems I should sleep more, you stated this already in your first post ... sorry!
Posts: 292
Joined: 13 Apr 2017

Gianni1962

Mine environment is like yours.
I'm using the latest FFS version 9.2.

The Sync of a locked file goes well thanks to the creation on the fly of a volume shadow copy of the E: drive.
FFS is notifying me of that in the Sync status window.

When I try to Sync with the option to "Copy locked files" unchecked, a popup window correctly informs me as follow:
Cannot read file "E:\TEMP\Test\Dummy 06.DBF".
The file is locked by another process:
Microsoft Visual FoxPro 9.0 SP2, "E:\Programmi\Microsoft Visual FoxPro 9\vfp9.exe"

Take a look at the Windows "Event Viewer" to understand what's going on, some hints at this link:

Troubleshooting Volume Shadow Copy Errors: First Steps
http://backupchain.com/en/troubleshooting-volume-shadow-copy-errors-first-steps/
Posts: 9
Joined: 17 Jul 2017

petur

I didn't see any of those things mentioned so that's already something to check.
Thanks for that link, too

My timing for posting the question was a bit stupid as I'm off for a short break. I'll report back when I can have another go at this!

Thanks for your input
Posts: 292
Joined: 13 Apr 2017

Gianni1962

Make sure you have Handle errors -> Pop-up in Synchronization Settings (F8).
Posts: 9
Joined: 17 Jul 2017

petur

oh, I may have had that one off so that would explain something already. Thanks!
User avatar
Posts: 71
Joined: 22 May 2006

Giangi

When outlook doesn't run the copy works. But this setup will get automated so it will need to deal with this in the end.petur, 17 Jul 2017, 16:58
If the files in use (you didn't specified extensions) are .ost then these are by default excluded from shadowcopies or any backup/copy made via VSS.

https://msdn.microsoft.com/en-us/library/windows/desktop/bb891959(v=vs.85).aspx#filesnottosnapshot

Personally I do not use FFS as a backup solution, but I had to modify the above key removing "OutlookOST" to have them included into both the "Previous Versions" and into the backup.
BTW: instead of deleting it I suggest to just remove the two "dollars" from the $UserProfile$ key so to not match anything and to be able to restore it quickly!
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

If the files in use (you didn't specified extensions) are .ost then these are by default excluded from shadowcopies or any backup/copy made via VSS. Giangi, 18 Jul 2017, 12:36
That caveat does not apply to FreeFileSync, which includes "ost" files as well:
viewtopic.php?t=1387
User avatar
Posts: 71
Joined: 22 May 2006

Giangi

...but the registry change i still worth trying... (IF the file in error is an .OST one)
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

...but the registry change i still worth trying... (IF the file in error is an .OST one) Giangi, 18 Jul 2017, 19:44
Until the OP posts an actual error message, it's all guesswork as to what has really happened.
Posts: 9
Joined: 17 Jul 2017

petur

Finally had time to investigate again...

The error that FFS gives is (sorry, the system runs Dutch version):
fout: Kan het bestand "C:\Users\Joris\AppData\Local\Microsoft\Outlook\Outlook.pst" niet lezen.
Foutcode 33: Het proces heeft geen toegang tot het bestand omdat een gedeelte van het bestand door een ander proces is vergrendeld. [ReadFile]
There are no VSS errors in the windows logs. When I stop VSS and start it again there is an entry so I look at the right logs I think. Tried vssdiag from backupchain, it says no errors found.

There is no registry key to exclude files

I checked VSS storage even cleared it:
PS C:\WINDOWS\system32> vssadmin resize shadowstorage /for=C: /on=c: /maxsize=1GB
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

PS C:WINDOWSsystem32> vssadmin resize shadowstorage /for=C: /on=c: /maxsize=50GB
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Successfully resized the shadow copy storage association

PS C:\WINDOWS\system32> vssadmin list shadowstorage
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Shadow Copy Storage association
   For volume: (C:)\\?\Volume{e3231c8a-8346-11e1-a178-806e6f6e6963}\
   Shadow Copy Storage volume: (C:)\\?\Volume{e3231c8a-8346-11e1-a178-806e6f6e6963}\
   Used Shadow Copy Storage space: 0 bytes (0%)
   Allocated Shadow Copy Storage space: 0 bytes (0%)
   Maximum Shadow Copy Storage space: 50,0 GB (10%)
I get the exact same error if I let FFS use VSS or not, I see no different behaviour at all. And I am 200% sure it runs as admin. I have zero indication that FFS is actually trying to use VSS.

I feel I reached a dead end... suggestions welcome
Posts: 9
Joined: 17 Jul 2017

petur

@Zenju (I saw your short reply) is there a way to debug if FFS is trying to use VSS or not?
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

I've fixed the issue which was related to locked byte ranges not being considered by FFS, but now they are:
http://www.mediafire.com/file/pov3c9iceib39pm/FreeFileSync_9.4_beta_Windows_Setup.exe
Posts: 9
Joined: 17 Jul 2017

petur

wow, great.

Will try this as soon as I can.

thanks!
Posts: 9
Joined: 17 Jul 2017

petur

SPAM...

but it reminded me I never got back here to report that it effectively fixed the issue I saw, the system is running sync fine now