Class S3

  • All Implemented Interfaces:
    hudson.model.Describable<Location>, hudson.model.ModelObject, hudson.search.SearchableModelObject, hudson.search.SearchItem

    public class S3
    extends Location
    S3 defines Amazon S3 (Simple Storage Service) to store the backup files
    • Constructor Detail

      • S3

        @DataBoundConstructor
        public S3​(String bucket,
                  boolean enabled,
                  String tmpDir,
                  String region,
                  String credentialsId)
    • Method Detail

      • storeBackupInLocation

        public void storeBackupInLocation​(Iterable<File> archives,
                                          File backupObjectFile)
                                   throws IOException
        Description copied from class: Location
        This method puts archived backup file(s) in location
        Specified by:
        storeBackupInLocation in class Location
        Parameters:
        archives - archive file(s)
        backupObjectFile - File with serialized backupObject
        Throws:
        IOException - IO error
      • retrieveBackupFromLocation

        public Iterable<File> retrieveBackupFromLocation​(BackupObject backup,
                                                         File tempDir)
                                                  throws IOException,
                                                         org.jenkinsci.plugins.periodicbackup.PeriodicBackupException
        Description copied from class: Location
        Retrieves backup archive files from this location
        Specified by:
        retrieveBackupFromLocation in class Location
        Parameters:
        backup - BackupObject related to the backup
        tempDir - temporary directory to store archived backup file(s)
        Returns:
        Iterable of backup archive(s) in temporary location
        Throws:
        IOException - if anything goes wrong with IO
        org.jenkinsci.plugins.periodicbackup.PeriodicBackupException - if anything else goes wrong
      • deleteBackupFiles

        public void deleteBackupFiles​(BackupObject backupObject)
        Description copied from class: Location
        This method deletes all files related to given BackupObject
        Specified by:
        deleteBackupFiles in class Location
        Parameters:
        backupObject - the backupObject of the backup we want to delete
      • getDisplayName

        public String getDisplayName()
      • getBucket

        public String getBucket()
      • setBucket

        public void setBucket​(String bucket)
      • getTmpDir

        public String getTmpDir()
      • setTmpDir

        public void setTmpDir​(String tmpDir)
      • getPrefix

        public String getPrefix()
      • setPrefix

        @DataBoundSetter
        public void setPrefix​(String prefix)
      • getRegion

        public String getRegion()
      • setRegion

        public void setRegion​(String region)
      • getCredentialsId

        public String getCredentialsId()
      • setCredentialsId

        public void setCredentialsId​(String credentialsId)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object