Class BackupEngine

java.lang.Object
de.willuhn.jameica.backup.BackupEngine

public class BackupEngine extends Object
Klasse mit statischen Funktionen, die das Backup ubernehmen.
  • Constructor Details

    • BackupEngine

      public BackupEngine()
  • Method Details

    • getBackups

      public static BackupFile[] getBackups(String dir) throws de.willuhn.util.ApplicationException
      Liefert eine Liste der bisher erstellten Backups.
      Parameters:
      dir - das Verzeichnis, in dem nach Backups gesucht werden soll. Ist es nicht angegeben, wird das aktuelle Default-Verzeichnis verwendet.
      Returns:
      eine Liste der Backups in diesem Verzeichnis.
      Throws:
      de.willuhn.util.ApplicationException
    • undoRestoreMark

      public static void undoRestoreMark()
      Macht eine ggf. vorhandene Auswahl der Backup-Wiederherstellung rueckgaengig.
    • markForRestore

      public static void markForRestore(BackupFile backup) throws de.willuhn.util.ApplicationException
      Markiert das uebergebene Backup fuer die Wiederherstellung. Das eigentliche Wiederherstellen der Daten geschieht beim naechsten Neustart der Anwendung.
      Parameters:
      backup - das zurueckzusichernde Backup.
      Throws:
      de.willuhn.util.ApplicationException
    • getCurrentRestore

      public static BackupFile getCurrentRestore() throws de.willuhn.util.ApplicationException
      Liefert das ggf aktuell zur Wiederherstellung vorgemerkte Backup.
      Returns:
      das aktuell vorgemerkte Backup oder null
      Throws:
      de.willuhn.util.ApplicationException
    • doRestore

      public static void doRestore(de.willuhn.util.ProgressMonitor monitor) throws de.willuhn.util.ApplicationException
      Fuehrt das Backup-Restore durch.
      Parameters:
      monitor -
      Throws:
      de.willuhn.util.ApplicationException
    • doBackup

      public static File[] doBackup(de.willuhn.util.ProgressMonitor monitor, boolean rotate) throws de.willuhn.util.ApplicationException
      Erstellt ein frisches Backup.
      Parameters:
      monitor - ein Progressmonitor fuer die Ausgabe des Fortschritts.
      rotate - true, wenn alte Backups rotiert werden sollen.
      Returns:
      Liste der gesicherten Verzeichnisse
      Throws:
      de.willuhn.util.ApplicationException