Documentation ¶
Index ¶
- Constants
- Variables
- func GetDBRestoreLSN(db *sql.DB, databaseName string) (string, error)
- func GetDefaultDataLogDirs(db *sql.DB) (string, string, error)
- func HandleBackupExport(externalConfig string, exportPrefixes map[string]string)
- func HandleBackupImport(externalConfig string, importDatabases map[string]string)
- func HandleBackupPush(dbnames []string, updateLatest bool)
- func HandleBackupRestore(backupName string, dbnames []string, fromnames []string, noRecovery bool)
- func HandleDatabaseList(backupName string)
- func HandleLogPush(dbnames []string, norecovery bool)
- func HandleLogRestore(backupName string, untilTS string, dbnames []string, fromnames []string, ...)
- func IsLogAlreadyApplied(db *sql.DB, databaseName string, logBackupFileProperties *BackupProperties) (bool, error)
- func RunProxy(folder storage.Folder)
- type BackupProperties
- type DatabaseFile
- type LockWrapper
- type SentinelDto
Constants ¶
View Source
const AllDatabases = "ALL"
View Source
const BlobNamePrefix = "blob_"
View Source
const ExternalBackupFilenameSeparator = ","
View Source
const LogNamePrefix = "wal_"
View Source
const MaxBlobSize = MaxTransferSize * MaxBlocksPerBlob
View Source
const MaxBlocksPerBlob = 25000 // 50000 actually, but we need some safety margin
View Source
const MaxTransferSize = 4 * 1024 * 1024
View Source
const TimeSQLServerFormat = "Jan 02, 2006 03:04:05 PM"
Variables ¶
View Source
var SystemDbnames = []string{
"master",
"msdb",
"model",
}
Functions ¶
func HandleBackupExport ¶
func HandleBackupImport ¶
func HandleBackupPush ¶
func HandleBackupRestore ¶
func HandleDatabaseList ¶
func HandleDatabaseList(backupName string)
func HandleLogPush ¶
func HandleLogRestore ¶
func IsLogAlreadyApplied ¶
Types ¶
type BackupProperties ¶
type BackupProperties struct { BackupType int DatabaseName string FirstLSN string LastLSN string CheckpointLSN string DatabaseBackupLSN string BackupStartDate time.Time BackupFinishDate time.Time HasBulkLoggedData bool IsSnapshot bool IsReadOnly bool IsSingleUser bool BackupURL string BackupFile string }
type DatabaseFile ¶
type LockWrapper ¶
type LockWrapper struct {
// contains filtered or unexported fields
}
func RunOrReuseProxy ¶
func RunOrReuseProxy(ctx context.Context, cancel context.CancelFunc, folder storage.Folder) (*LockWrapper, error)
func (LockWrapper) Close ¶
func (lw LockWrapper) Close()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.