cancel
Showing results for 
Search instead for 
Did you mean: 

Archives restored by "fsautility -b" loose their modification times

bruphi10
Level 3

Hi all,

We have some problems  to recall FSA archives for which placeholder is still present on the Netapp filer.
We use fsautility -b for that.
Files are normally restored but the the modification time is lost. In the VaultStore we can see that this information is present with EVS  but it seems not to be restored by fsautility.
If we have a look on the properties of the restored files in Windows explorer, modification time is 01/01/1970.
We also loose initial creation date but less annoying for us.
Original files on Netapp filer ( DOT 8.2.4  7-Mode )
EV Version : 12.2.0.1437.
Upgrade from EV11 done 2 one year ago.

Any idea ?
Thanks 

Bruno

13 REPLIES 13

plaudone1
Level 6
Employee

Hi Bruno,

This was an issue fixed in 12.2.3 and was due to change in the supported schema.https://www.veritas.com/support/en_US/article.100041232

I would suggest updating to this version  ASAP.  You should stop archiving as these files will get archived an replace the previous version of the file.  If items have been archived with this date then I would suggest opening a case so that the items can be deleted.  This will revert the item to the last version of the file which should have the correct modified date. 

The below query run against the vault store will help to identify if any items have been archived with the incorrect modified date. 

SELECT
IdTransaction
,IdDateTime
,ArchivedDate
,cast(FolderPath as nvarchar(max)) + '\' +
CASE
WHEN LEFT(SavesetProperty.properties,1) = '<' and RIGHT(SavesetProperty.properties,1) = '>' THEN SUBSTRING(properties, (CHARINDEX('<filename>', properties)+10), (CHARINDEX('</filename>', properties)-(CHARINDEX('<filename>', properties)+10)))
WHEN LEFT(SavesetProperty.properties,6) = 'FSA/3/' THEN SUBSTRING(properties, 7, CHARINDEX('/', properties, 7)-7)
END AS Filename
FROM
SavesetProperty
JOIN Saveset on SavesetProperty.SavesetIdentity = Saveset.SavesetIdentity
JOIN Vault on Saveset.VaultIdentity = Vault.VaultIdentity
JOIN EnterpriseVaultDirectory.dbo.Root RT on Vault.VaultID = RT.VaultEntryId
JOIN EnterpriseVaultDirectory.dbo.ArchiveFolder AF on RT.RootIdentity = AF.RootIdentity

WHERE IdDateTime < '1971-01-01 00:00:00'

 

Thanks,

Patrick 

 

Hello Patrick

Thank you for your quick response.
I just upgraded EV to 12.2.3.
Now i would like to restore my FSA archives with  correct creation/modification times.
I think that i have to execute a script on my database to correct bad informations stored.
I have an open case on french EV support but responses are likely tardy ( new response on September 4 !! ).
Do you have such a script or be able to get it quickly ?
Thanks 

Hi,

Good, the issue should not occur on the upgraded version.  We will need to clean up if the script return items?  If so, yes we will have to run another script to remove those items from the DB.  This will revert the item to the last item version.  If you are not Pruning items to 1 (EV keeps all versions by default) then it should be good. 

Please send me your case ID and upload the output from the previous query to that case. I can then ensure we get it looked at from the Support side.

Regards,

Patrick 

Hi Patrick,
Yes the script returns a lot of items: around 220.000 rows among 2.600.000 total rows in the SavesetProperty table.
You'll find the results attached : filenames are hidden .
I zipped the result file but it still big ( around 7Mo)
Here is the Veritas case number : 180829-001170

T
hanks for your involvement.
Bruno

Hi Bruno,

I have updated the case with the process and the Engineer should be contacting you to discuss the procedure.  This should remove all of the 1970 items and allow for the previous version to be restored.

Regards,

Patrick 

Thank you Patrick.
My collegue Benoit will treat this case on next monday since i'll take some holidays ( back at office in one week).
He also receives emails on this account.
I just wanted to precise that pruning was not configured in our FSA archiving task : I don't understand why we get two or more items in the savesetProperty table for one PH.... (these are visible in EVS).
I hope that deleting the 'last' version of an archive by script will not have the effect this archive not to be able to be restored by fsautility  !!
Thanks again.

Bruno

Enjoy your time off Bruno!  

Each version would be a new entry in EVS and the Saveset/SavesetProperty table to capture the unique version attributes. After deleting the items with the script you should see one less version and the latest version of the file will be used. 

Regards,

Patrick 

Hi Patrick

We received the script from the support team a few days ago. We just created the delete item procedure in SQL.
And finally we executed this procedure against  2 pdf items.
The procedure doest report any error but after the execution the 2 files can't be open.
Any idea ?
Thanks

Bruno

Hi Bruno,

Thanks for the update.  The placeholders would have to be recreated in order to point to the previous version of the file.  Each placeholder points to the version of the file it was created for.  You could rename the files and then run FSAUtility -c -s \\server\share\folder to recreate the placeholder files.  Then test the recall with the new file. 

Regards,

Patrick 

Thank you for your reply Patrick.
We have successfully restored 2 files with fsautility -c and then recalling them manually .
But this method will be too long for about 220.000 files !!!
So we tried to run the deletion script  against two subfolders and then trying bulk restore with fsautility -b -s -recurse (synchonously by creating registry entry HKLM\Software\Wow6432Node\KVS\Enterprise Vault\FSARestore\FileDownloadTimeOut  Dword32 Value:5
Some files are successfully restored but there are many errors.
you will find attached the last 2 xml log files and some events related from the Vault Server.
Thanks for your help.
Bruno

 

 

Hi Bruno,

This was just a validation test.  You can recreate all placeholder files by using a -f switch with FSAUtility -c command.  This will force the recreation of the PH file.  This would be performed after deleting the database entries with the script.  This comes with a risk of overwriting files that have been recalled and updated, but not yet re-archived.  

Another solution would be to use Powershell to find and delete all files on the server with the older modified date.  Then use FSAUtility -c to recreate the PH files in the entire structure.  This should allow the process to recreate only files that no longer exist on the file server.  Again. this would be run after deleting all entries in SQL.  

The following would identify items that have the older modified date and move them to another folder.  This can be added to a .ps1 file and run against the path.  You could then run FSAUtility -c -s \\server\share to recreate all PH files. 

$sourceDir = "\\server\share\Source"

$targetDir = "\\server\share\Destination"

Get-ChildItem -Path $sourceDir -Include *.* -Recurse | Where-Object { $_.LastWriteTime -lt (get-date).AddDays(-16790)} |

ForEach {

$targetFile = $targetDir + $_.FullName.Substring($sourceDir.Length);

New-Item -ItemType File -Path $targetFile -Force

Move-item $_.FullName -destination $targetfile -Force

}

Regards,

Patrick 

Hi Patrick .
Thanks again for your reply.
We will think about the best solution knowing that our ultimate goal is to recover the files and not the placeholders on our Netapp filer.
We would like to lose as few files as possible due to errors like the ones I indicated to you before.
I'll update you as soon as possible.
Regards.

Bruno

Hi Patrick
After having discuss between us , we think that it will be better to update last modification time in the last version of the item in the DB for each item having been archived with 1970-01-01 modification date. That is storing the last "correct" modification time in the lfor each item in the saveset table. And then bulk recalling files with fsautility -b. It would be faster than doing additional steps.
Could you help us getting such a script or stored procedure ?

Thanks in advance.

Regards
Bruno