{"modulePath":"github.com/launchdarkly/ldcli","version":"v1.18.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package backup\n\n## Types\n\n```go\ntype Manager struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewManager(dbPath string, dbName string, backupFilePattern string, restoreFilePattern string) *Manager\n```\nNewManager creates a new backup manager Each instance of a Manager can run 1 backup or restore at a time (internally uses a mutex) It is safe to create multiple instances of Manager which could run Backups/Restores concurrently\n\n```go\nfunc (m *Manager) AddValidationQueries(queries ...string)\n```\nAddValidationQueries Adds queries to run on a restored database to ensure meets some criteria These queries should cause db.Exec to return error if the database imported is invalid. For example, if the database does not have a vital table\n\n```go\nfunc (m *Manager) MakeBackupFile(ctx context.Context) (string, error)\n```\nMakeBackupFile returns a string path of the sqlite database backup\n\n```go\nfunc (m *Manager) RestoreToFile(ctx context.Context, stream io.Reader) (string, error)\n```\nRestoreToFile returns a string path of the sqlite database restored from the stream\n\n","path":"github.com/launchdarkly/ldcli/internal/dev_server/db/backup","name":"backup","synopsis":"","isRedistributable":true}
