Interface BackupFileStore

All Known Implementing Classes:
DefaultBackupFileStore

public interface BackupFileStore
Service to deal with access to backup files
Since:
v2.7
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    If there are more than the maximum number of automated backup files, delete the oldest ones
    Extract the timestamp from the name of the given backup file.
    Returns the directory where backup files are stored
    Return a list of automated backup files, sorted by ascending date.
  • Method Details

    • getBackupDirectory

      File getBackupDirectory()
      Returns the directory where backup files are stored
      Returns:
      the directory where backup files are stored
    • getBackupFiles

      List<File> getBackupFiles()
      Return a list of automated backup files, sorted by ascending date. Note: the date is taken from the filename, not from the file itself.
      Returns:
      a list of File
    • extractTimestamp

      Date extractTimestamp(File file)
      Extract the timestamp from the name of the given backup file.
      Parameters:
      file - an automated backup file
      Returns:
      a Date, or null if the file is not a valid backup file
    • cleanUpAutomatedBackupFiles

      void cleanUpAutomatedBackupFiles()
      If there are more than the maximum number of automated backup files, delete the oldest ones