Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBackupFile ¶
CreateBackupFile creates a backup file from the database contents
YOU NEED TO CLOSE THE RETURNED FILE
func Restore ¶
func Restore(dbConn db.Connection, backupFile string, options StartScheduleOptions)
Restore restores a s3 backup to the mongodb database
func StartsSchedule ¶
func StartsSchedule(dbConn db.Connection, options StartScheduleOptions, forceBackup bool)
StartsSchedule starts the cron job for creating the backups The backupMasterKey is used to encrypt the backup files generated
Types ¶
type StartScheduleOptions ¶
type StartScheduleOptions struct { // The key used to encrypt / decrypt the backup files BackupEncryptionKey string // S3 connection options S3Endpoint string S3AccessKeyID string S3SecretAccessKey string S3Bucket string S3UseSSL bool }
StartScheduleOptions are the options required to run StartsSchedule All fields are required to start the backup schedule
func StartScheduleOptionsFromEnv ¶
func StartScheduleOptionsFromEnv() StartScheduleOptions
StartScheduleOptionsFromEnv creates the StartScheduleOptions from the environment variables
Click to show internal directories.
Click to hide internal directories.