Documentation
¶
Index ¶
Constants ¶
View Source
const ( DeleteLogsAfterDays = 5 FolderNameBackup = "backupdata" FileNameMetaData = "meta_data.csv" IntervalBackup = "@every 10s" // cron-like syntax format to define a recurring schedule. Alternative examples: "@every 30m", "@every 6h", "@every 1d" MaxFileSizeInBytes int64 = 2 * 1024 * 1024 * 1024 // Maximum permitted backup csv file size. Consider max upload size permitted by AWS S3 => README.md // Database MongoDatabaseSchemeEnv = "MONGODB_SCHEME" MongoDatabaseUsernameEnv = "MONGODB_USERNAME" MongoDatabasePasswordEnv = "MONGODB_PASSWORD" MongoDatabaseHostdEnv = "MONGODB_HOST" MongoDatabasePortEnv = "MONGODB_PORT" MongoDatabaseNameEnv = "MONGODB_DATABASE_NAME" // Email SendEmailNotifications = false // If false, no email notifications at all (error & success) EmailProviderUserNameEnv = "EMAIL_PROVIDER_USERNAME" EmailProviderPasswordEnv = "EMAIL_PROVIDER_PASSWORD" EmailProviderSmtpPortEnv = "EMAIL_PROVIDER_SMTP_PORT" EmailProviderHostEnv = "EMAIL_PROVIDER_HOST" EmailAddressSenderEnv = "EMAIL_ADDRESS_SENDER_BACKUP" EmailAddressReceiverEnv = "EMAIL_ADDRESS_RECEIVER_BACKUP" // Circular buffer S3 settings IsCircularBufferActivatedS3 = true // If false, all created backups will be stored and not deleted by this program - no circular buffer mechanism MaxBackupsS3 = 5 // Circular buffer deletes backups older than latest number of MaxBackupsS3 in S3 // Circular buffer local settings UseLocalBackupStorage = true // If false, backups are only stored on aws IsCircularBufferActivatedLocally = true // If false, all created backups will be stored and not deleted by this program - no circular buffer mechanism MaxBackupsLocally = 5 // Circular buffer deletes backups older than latest number of MaxBackupsLocally locally if above 'LocalBackupStorage' is true // AWS S3 Production config .env variable names S3BucketEnv = "AWS_S3_BUCKET_NAME" S3RegionEnv = "AWS_REGION" S3AccessKeyEnv = "AWS_ACCESS_KEY_ID" S3SecretKeyEnv = "AWS_SECRET_ACCESS_KEY" )
Variables ¶
View Source
var MetaFileHeaders = []string{
"collection_name",
"folder_path",
"file_name",
"size_in_bytes",
"database_name",
"date_start_entire_backup",
"date_finalized_file",
}
MetaHeaders represents the header names for the meta CSV file
Functions ¶
This section is empty.
Types ¶
type RowTypesMeta ¶
type RowTypesMeta struct { CollectionName string //`csv:"collectionName"` FolderPath string //`csv:"folderPath"` FileName string //`csv:"fileName"` SizeInBytes int64 //`csv:"sizeInBytes"` DatabaseName string //`csv:"databaseName"` DateStartBackup time.Time //`csv:"dateStartBackup"` DateFinalizedFile time.Time //`csv:"dateFinalizedFile"` }
//////////////////////////////////////////////////////////////////////// RowTypes represents a row of data in the CSV file for meta information /////////////////
Click to show internal directories.
Click to hide internal directories.