Class DBBackupRestoreClient
- java.lang.Object
-
- com.salesforce.multicloudj.dbbackuprestore.client.DBBackupRestoreClient
-
- All Implemented Interfaces:
AutoCloseable
public class DBBackupRestoreClient extends Object implements AutoCloseable
Client for performing database backup and restore operations across multiple cloud providers. This class provides a cloud-agnostic interface for backup and restore operations.- Since:
- 0.2.25
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDBBackupRestoreClient.DBBackupRestoreClientBuilderBuilder class for constructing DBBackupRestoreClient instances.
-
Constructor Summary
Constructors Constructor Description DBBackupRestoreClient(AbstractDBBackupRestore dbBackupRestore)Creates a new DBBackupRestoreClient wrapping the given driver.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DBBackupRestoreClient.DBBackupRestoreClientBuilderbuilder(String providerId)Creates a new builder for constructing a DBBackupRestoreClient.voidclose()BackupgetBackup(String backupId)Gets details of a specific backup by its ID.RestoregetRestoreJob(String restoreId)Gets details of a specific restore operation by its ID.List<Backup>listBackups()Lists all available backups for the current table.StringrestoreBackup(RestoreRequest request)Restores a table from a backup.
-
-
-
Constructor Detail
-
DBBackupRestoreClient
public DBBackupRestoreClient(AbstractDBBackupRestore dbBackupRestore)
Creates a new DBBackupRestoreClient wrapping the given driver.- Parameters:
dbBackupRestore- the database backup restore driver implementation
-
-
Method Detail
-
builder
public static DBBackupRestoreClient.DBBackupRestoreClientBuilder builder(String providerId)
Creates a new builder for constructing a DBBackupRestoreClient.- Parameters:
providerId- the cloud provider identifier- Returns:
- a new ClientBuilder instance
-
listBackups
public List<Backup> listBackups()
Lists all available backups for the current table.- Returns:
- a list of Backup objects representing available backups
-
getBackup
public Backup getBackup(String backupId)
Gets details of a specific backup by its ID.- Parameters:
backupId- the unique identifier of the backup- Returns:
- the Backup object with full metadata
-
restoreBackup
public String restoreBackup(RestoreRequest request)
Restores a table from a backup. The restore operation may take time depending on the backup size and is async request.- Parameters:
request- the restore request containing restore configuration- Returns:
- the unique identifier of the restore operation for status tracking
-
getRestoreJob
public Restore getRestoreJob(String restoreId)
Gets details of a specific restore operation by its ID.- Parameters:
restoreId- the unique identifier of the restore operation- Returns:
- the Restore object with full metadata
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-