Interface IBackupWorker


public interface IBackupWorker
  • Method Details

    • getDataType

      String getDataType()
    • supportsTag

      boolean supportsTag(String tag)
    • prepareDataDirs

      void prepareDataDirs(IDPContext ctx, String tag, ItemValue<Server> toBackup) throws ServerFault
      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

      Set<String> getDataDirs()
      This is called after prepareDataDirs. 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