Package net.bluemind.dataprotect.api
Interface IBackupWorker
public interface IBackupWorker
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
cleanup
(IDPContext ctx, PartGeneration part, Map<String, Object> params) default void
dataDirsSaved
(IDPContext ctx, String tag, ItemValue<Server> backedUp) This gets called once the data is saved with rsync.This is called afterprepareDataDirs
.void
prepareDataDirs
(IDPContext ctx, String tag, ItemValue<Server> toBackup) This is called before the backup starts.default void
restore
(IDPContext ctx, PartGeneration part, Map<String, Object> params) boolean
supportsTag
(String tag)
-
Method Details
-
getDataType
String getDataType() -
supportsTag
-
prepareDataDirs
This is called before the backup starts. This phase is used to put the data in a backup-able state. For a database it means creating a dump, for a cyrus mail server it means stopping it, etc.- Parameters:
ctx
-tag
-toBackup
-- Throws:
ServerFault
-
getDataDirs
This is called afterprepareDataDirs
. Rsync will be used to save those dirs. Symlinks are handled by the dataprotect code, so you don't need special code here to check if the dir war symlinked elsewhere.- Returns:
- the dirs that need to be data protected
-
dataDirsSaved
default void dataDirsSaved(IDPContext ctx, String tag, ItemValue<Server> backedUp) throws ServerFault This gets called once the data is saved with rsync. At this point you can remove the data you exported for backup, restart the services that you stopped, etc.- Parameters:
ctx
-tag
-backedUp
-- Throws:
ServerFault
-
restore
default void restore(IDPContext ctx, PartGeneration part, Map<String, Object> params) throws ServerFault- Throws:
ServerFault
-
cleanup
default void cleanup(IDPContext ctx, PartGeneration part, Map<String, Object> params) throws ServerFault- Throws:
ServerFault
-