Class IPFSBackupMethods

java.lang.Object
wrappers.IPFSBackupMethods

public class IPFSBackupMethods extends Object
Provides wrapper methods that run the low level IPFS wrappers to execute backup use cases. Exceptions are caught, chained and re-thrown
  • Constructor Details

    • IPFSBackupMethods

      public IPFSBackupMethods(Host clusterHost, Host clusterProxyHost)
      Initializes the wrapper and creates a proxy as well as a cluster connector
      Parameters:
      clusterHost - The address of the cluster
      clusterProxyHost - The address of the proxy
  • Method Details

    • init

      public void init(String repoName, String repoPassword)
      Initializes a repository with the given name and password
      Parameters:
      repoName - The name of the repository
      repoPassword - The password of the repository
    • backup

      public void backup(String repoName, String repoPassword, File... source)
      Executes a backup operation
      Parameters:
      repoName - The name of the target repository
      repoPassword - The password of the target repository
      source - The sources to use for the backup
    • restore

      public void restore(String repoName, String repoPassword, File target, int index)
      Executes a restore operation on the provided repository
      Parameters:
      repoName - The name of the repository
      repoPassword - The password of the repository
      target - The target folder to restore to
      index - The index of the snapshot to restore, 0 being the latest
    • prune

      public void prune(String repoName, String repoPassword, int keepLast)
      Executes a prune operation on the repository
      Parameters:
      repoName - The name of the repository to execute the operation on
      repoPassword - The password of the repository
      keepLast - How many snapshots to keep
    • list

      public void list(String repoName, String repoPassword, int last)
      Lists meta information of all snapshots
      Parameters:
      repoName - The name of the repository
      repoPassword - The password of the repository
      last - How many latest snapshots to list.