Add dump and restore functionality for internal DBs

This commit is contained in:
arberkatellari
2025-03-28 19:36:41 +02:00
committed by Dan Christian Bogos
parent 17248c5dde
commit a168f262e2
70 changed files with 4077 additions and 303 deletions

View File

@@ -143,6 +143,9 @@ type DataDB interface {
SetBackupSessionsDrv(nodeID string, tenant string, sessions []*StoredSession) error
GetSessionsBackupDrv(nodeID string, tenant string) ([]*StoredSession, error)
RemoveSessionsBackupDrv(nodeID, tenant, cgrid string) error
DumpDataDB() error
RewriteDataDB() error
BackupDataDB(string, bool) error
}
type StorDB interface {
@@ -220,6 +223,9 @@ type LoadWriter interface {
SetTPChargers([]*utils.TPChargerProfile) error
SetTPDispatcherProfiles([]*utils.TPDispatcherProfile) error
SetTPDispatcherHosts([]*utils.TPDispatcherHost) error
DumpStorDB() error
RewriteStorDB() error
BackupStorDB(string, bool) error
}
// NewMarshaler returns the marshaler type selected by mrshlerStr