fn atomic_replace<F>(path: &Path, writer: F) -> Result<(), BackupRestoreError>where F: FnOnce(&mut File) -> Result<(), BackupRestoreError>,