updates to backups directory (#1099)

* read BackupDirectory from command line flag

* Change the default backup directory

* mkdir BackupDirectory

* use config for backup file path

* migrateDatabase to the backup directory

* use DoesFileExists

change permission on the directory to 0700

* declare err

* generate backupFile  where needed

* style fix

* more style fixes

* more style fixes
This commit is contained in:
Meisam
2021-06-14 00:28:59 +02:00
committed by GitHub
parent d9a6be2ac6
commit e991199735
4 changed files with 22 additions and 4 deletions

View File

@@ -11,8 +11,6 @@ const (
PrivateHLSStoragePath = "hls"
// FfmpegSuggestedVersion is the version of ffmpeg we suggest.
FfmpegSuggestedVersion = "v4.1.5" // Requires the v
// BackupDirectory is the directory we write backup files to.
BackupDirectory = "backup"
// DataDirectory is the directory we save data to.
DataDirectory = "data"
)
@@ -20,4 +18,6 @@ const (
var (
// PublicHLSStoragePath is the directory we write public HLS files to for distribution.
PublicHLSStoragePath = filepath.Join(WebRoot, "hls")
// BackupDirectory is the directory we write backup files to.
BackupDirectory = filepath.Join(DataDirectory, "backup")
)