public void RestoreAllViaServer() { using (ServerClientSession session = new ServerClientSession(systemDir, null, 2000, false)) // don't use optimistic locking for restore { session.BeginUpdate(); DatabaseLocation backupLocation = new DatabaseLocation(Dns.GetHostName(), backupDir, backupLocationStartDbNum, UInt32.MaxValue, session, PageInfo.compressionKind.None, PageInfo.encryptionKind.noEncryption, true, session.DatabaseLocations.Default()); session.RestoreFrom(backupLocation, DateTime.Now); session.Commit(false); } }
public void RestoreToBackupServer() { using (ServerClientSession session = new ServerClientSession(s_systemDir, systemHost)) { session.ClearServerCache(); // normally don't use this function but use it here to simulate a server going down and restarting } using (ServerClientSession session = new ServerClientSession(s_systemDir, backupHost, 1000, true, inMemoryOnly)) { session.BeginUpdate(); DatabaseLocation backupLocation = new DatabaseLocation(backupHost, backupDir, backupLocationStartDbNum, UInt32.MaxValue, session, PageInfo.compressionKind.LZ4, PageInfo.encryptionKind.noEncryption, true, session.DatabaseLocations.Default()); session.RestoreFrom(backupLocation, DateTime.MaxValue); session.Commit(false, true); } }
public void RestoreAllViaServer() { using (ServerClientSession session = new ServerClientSession(systemDir, null, 2000, false)) // don't use optimistic locking for restore { session.BeginUpdate(); DatabaseLocation backupLocation = new DatabaseLocation(Dns.GetHostName(), backupDir, backupLocationStartDbNum, UInt32.MaxValue, session, PageInfo.compressionKind.None, PageInfo.encryptionKind.noEncryption, true, session.DatabaseLocations.Default()); session.RestoreFrom(backupLocation, DateTime.UtcNow); session.Commit(false, true); } }
public void RestoreToBackupServer() { using (ServerClientSession session = new ServerClientSession(s_systemDir, systemHost)) { session.ClearServerCache(); // normally don't use this function but use it here to simulate a server going down and restarting } using (ServerClientSession session = new ServerClientSession(s_systemDir, backupHost, 1000, true, inMemoryOnly)) { session.BeginUpdate(); DatabaseLocation backupLocation = new DatabaseLocation(backupHost, backupDir, backupLocationStartDbNum, UInt32.MaxValue, session, PageInfo.compressionKind.LZ4, PageInfo.encryptionKind.noEncryption, true, session.DatabaseLocations.Default()); session.RestoreFrom(backupLocation, DateTime.MaxValue); session.Commit(false, true); } }