private void restoreBackupIncremental ( ) { try { if ( fa . isStreamElement ( fileName + ".backup" ) ) { RAShadowFile . restoreFile ( fileName + ".backup" , fileName + ".data" ) ; } else { /* // this is to ensure file has been written fully but it is not necessary // as semantics dictate that if a backup does not exist, the file // was never changed or was fully written to if (FileUtil.exists(cacheFileName)) { int flags = DataFileCache.getFlags(cacheFileName); if (!BitMap.isSet(flags, DataFileCache.FLAG_ISSAVED)) { FileUtil.delete(cacheFileName); } } */ } deleteBackup ( ) ; } catch ( IOException e ) { throw Error . error ( ErrorCode . FILE_IO_ERROR , fileName + ".backup" ) ; } }
Restores in from an incremental backup