chore: add storage type alt for smallcase and uppercase

This commit is contained in:
Jonas Kaninda
2024-10-03 18:05:50 +02:00
parent 45aec0d461
commit 44d9b83426
2 changed files with 7 additions and 7 deletions

View File

@@ -21,15 +21,15 @@ func StartRestore(cmd *cobra.Command) {
restoreConf := initRestoreConfig(cmd)
switch restoreConf.storage {
case "s3":
restoreFromS3(dbConf, restoreConf.file, restoreConf.bucket, restoreConf.s3Path)
case "local":
utils.Info("Restore database from local")
copyToTmp(storagePath, restoreConf.file)
RestoreDatabase(dbConf, restoreConf.file)
case "ssh":
case "s3", "S3":
restoreFromS3(dbConf, restoreConf.file, restoreConf.bucket, restoreConf.s3Path)
case "ssh", "SSH", "remote":
restoreFromRemote(dbConf, restoreConf.file, restoreConf.remotePath)
case "ftp":
case "ftp", "FTP":
restoreFromFTP(dbConf, restoreConf.file, restoreConf.remotePath)
default:
utils.Info("Restore database from local")