Documentation ¶
Overview ¶
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package utils / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *
Index ¶
- func BackupDatabase(db *dbConfig, backupFileName string, disableCompression bool)
- func BackupTask(db *dbConfig, config *BackupConfig)
- func CopyFromFTP(fileName, remotePath string) (err error)
- func CopyFromRemote(fileName, remotePath string) error
- func CopyToFTP(fileName, remotePath string) (err error)
- func CopyToRemote(fileName, remotePath string) error
- func CreateSession() (*session.Session, error)
- func Decrypt(inputFile string, passphrase string) error
- func DeleteOldBackup(bucket, prefix string, retention int) error
- func DownloadFile(destinationPath, key, bucket, prefix string) error
- func Encrypt(inputFile string, passphrase string) error
- func RemoveLastExtension(filename string) string
- func RestoreDatabase(db *dbConfig, file string)
- func StartBackup(cmd *cobra.Command)
- func StartMigration(cmd *cobra.Command)
- func StartRestore(cmd *cobra.Command)
- func UploadFileToS3(filePath, key, bucket, prefix string) error
- type BackupConfig
- type Config
- type FTPConfig
- type RestoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupDatabase ¶
BackupDatabase backup database
func BackupTask ¶ added in v1.2.8
func BackupTask(db *dbConfig, config *BackupConfig)
func CopyFromFTP ¶ added in v1.2.9
CopyFromFTP downloads a file from the remote FTP server
func CopyFromRemote ¶
func CopyToRemote ¶
func CreateSession ¶ added in v1.2.9
CreateSession creates a new AWS session
func DeleteOldBackup ¶ added in v1.2.9
func DownloadFile ¶ added in v1.2.9
func RemoveLastExtension ¶
func RestoreDatabase ¶
func RestoreDatabase(db *dbConfig, file string)
RestoreDatabase restore database
func StartBackup ¶
func StartMigration ¶ added in v1.2.3
func StartRestore ¶
func UploadFileToS3 ¶ added in v1.2.9
UploadFileToS3 uploads a file to S3 with a given prefix
Types ¶
type BackupConfig ¶ added in v1.2.8
type BackupConfig struct {
// contains filtered or unexported fields
}
type FTPConfig ¶ added in v1.2.9
type FTPConfig struct {
// contains filtered or unexported fields
}
type RestoreConfig ¶ added in v1.2.8
type RestoreConfig struct {
// contains filtered or unexported fields
}