Interface IBackupWorker


public interface IBackupWorker
  • Method Details Link icon

    • getDataType Link icon

      String getDataType()
    • supportsTag Link icon

      boolean supportsTag(String tag)
    • prepareDataDirs Link icon

      default void prepareDataDirs(IDPContext ctx, PartGeneration partGen, 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 -
      toBackup -
      tag -
      Throws:
      ServerFault
    • getDataDirs Link icon

      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 Link icon

      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 Link icon

      default void restore(IDPContext ctx, PartGeneration part, Map<String,Object> params) throws ServerFault
      Throws:
      ServerFault
    • cleanup Link icon

      default void cleanup(IDPContext ctx, PartGeneration part, Map<String,Object> params) throws ServerFault
      Throws:
      ServerFault