File meta data backup

Soldato
Joined
2 May 2004
Posts
19,950
Hi,

Currently I use CrashPlan to backup, the only problem is if I restore a file it doesn't bring back the created/accessed dates (more importantly created).

I'd like to keep my created dates on my files if there ever was a disaster.

Is there some sort of meta data backup program that will save all my file dates and other info into a file or text document which can be restored onto the files if necessary?

Thanks.
 
Assuming you haven't already I'd probably go back to the vendor and ask them about it as it seems an odd thing for it not to keep. Unless it's just doing things on archive bit I would've expected it to be using meta data to help identify the files properly. Though to be honest I have no real idea what CrashPlan is or how it works.

Other than that, depending on how complex you need it to be you could look at scripting something with powershell, as that should allow you to get and set the properties on the files.

Code:
PS C:\Scripts> New-Item .\test.txt -ItemType File


    Directory: C:\Scripts


Mode                LastWriteTime     Length Name                                                                    
----                -------------     ------ ----                                                                    
-a---        05/05/2014     11:16          0 test.txt                                                                



__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Get-Member -MemberType Property


   TypeName: System.IO.FileInfo

Name              MemberType Definition                                    
----              ---------- ----------                                    
Attributes        Property   System.IO.FileAttributes Attributes {get;set;}
CreationTime      Property   System.DateTime CreationTime {get;set;}       
CreationTimeUtc   Property   System.DateTime CreationTimeUtc {get;set;}    
Directory         Property   System.IO.DirectoryInfo Directory {get;}      
DirectoryName     Property   System.String DirectoryName {get;}            
Exists            Property   System.Boolean Exists {get;}                  
Extension         Property   System.String Extension {get;}                
FullName          Property   System.String FullName {get;}                 
IsReadOnly        Property   System.Boolean IsReadOnly {get;set;}          
LastAccessTime    Property   System.DateTime LastAccessTime {get;set;}     
LastAccessTimeUtc Property   System.DateTime LastAccessTimeUtc {get;set;}  
LastWriteTime     Property   System.DateTime LastWriteTime {get;set;}      
LastWriteTimeUtc  Property   System.DateTime LastWriteTimeUtc {get;set;}   
Length            Property   System.Int64 Length {get;}                    
Name              Property   System.String Name {get;}                     



__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select *


PSPath            : Microsoft.PowerShell.Core\FileSystem::C:\Scripts\test.txt
PSParentPath      : Microsoft.PowerShell.Core\FileSystem::C:\Scripts
PSChildName       : test.txt
PSDrive           : C
PSProvider        : Microsoft.PowerShell.Core\FileSystem
PSIsContainer     : False
VersionInfo       : File:             C:\Scripts\test.txt
                    InternalName:     
                    OriginalFilename: 
                    FileVersion:      
                    FileDescription:  
                    Product:          
                    ProductVersion:   
                    Debug:            False
                    Patched:          False
                    PreRelease:       False
                    PrivateBuild:     False
                    SpecialBuild:     False
                    Language:         
                    
BaseName          : test
Mode              : -a---
Name              : test.txt
Length            : 0
DirectoryName     : C:\Scripts
Directory         : C:\Scripts
IsReadOnly        : False
Exists            : True
FullName          : C:\Scripts\test.txt
Extension         : .txt
CreationTime      : 05/05/2014 11:16:04
CreationTimeUtc   : 05/05/2014 10:16:04
LastAccessTime    : 05/05/2014 11:16:04
LastAccessTimeUtc : 05/05/2014 10:16:04
LastWriteTime     : 05/05/2014 11:16:04
LastWriteTimeUtc  : 05/05/2014 10:16:04
Attributes        : Archive




__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select CreationTimeUtc

CreationTimeUtc                                                                                                      
---------------                                                                                                      
05/05/2014 10:16:04                                                                                                  



__________________________________________________________________________________________________________________
PS C:\Scripts> (Get-ChildItem .\test.txt).CreationTimeUtc = get-date

__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select CreationTimeUtc

CreationTimeUtc                                                                                                      
---------------                                                                                                      
05/05/2014 10:19:07                                                                                                  



__________________________________________________________________________________________________________________
PS C:\Scripts> Get-ChildItem .\test.txt | Select CreationTime

CreationTime                                                                                                         
------------                                                                                                         
05/05/2014 11:19:07
 
Thanks very much, that looks good :)

Unfortunately the vendor said they just don't record the file dates (apart from modified). Not sure why, but it seems that a fair few online backup companies do this.
 
Back
Top Bottom