Skip to content

Commit aee069d

Browse files
authored
Merge pull request #1717 from dannyzaken/danny-db-backup
DB Backup - Design doc and initial changes
2 parents 0e31b7f + 638e528 commit aee069d

File tree

7 files changed

+1038
-2
lines changed

7 files changed

+1038
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ build-releases/
1515
# NooBaa config file
1616
noobaa.cfg.yaml
1717

18+
# ignore any DS_Store file created by macos
19+
.DS_Store
20+
1821
*.IGNORE

deploy/crds/noobaa.io_noobaas.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,38 @@ spec:
12071207
dbSpec:
12081208
description: DBSpec (optional) DB spec for a managed postgres cluster
12091209
properties:
1210+
dbBackup:
1211+
description: |-
1212+
DBBackup (optional) configure automatic scheduled backups of the database volume.
1213+
Currently, only volume snapshots are supported.
1214+
properties:
1215+
schedule:
1216+
description: Schedule the schedule for the database backup
1217+
in cron format.
1218+
type: string
1219+
volumeSnapshot:
1220+
description: |-
1221+
VolumeSnapshot the volume snapshot backup configuration.
1222+
Currently this is the only supported backup method and hence it is required.
1223+
properties:
1224+
maxSnapshots:
1225+
description: MaxSnapshots the maximum number of snapshots
1226+
to keep.
1227+
minimum: 1
1228+
type: integer
1229+
volumeSnapshotClass:
1230+
description: VolumeSnapshotClass the volume snapshot class
1231+
for the database volume.
1232+
minLength: 1
1233+
type: string
1234+
required:
1235+
- maxSnapshots
1236+
- volumeSnapshotClass
1237+
type: object
1238+
required:
1239+
- schedule
1240+
- volumeSnapshot
1241+
type: object
12101242
dbConf:
12111243
additionalProperties:
12121244
type: string
@@ -1219,6 +1251,18 @@ spec:
12191251
Increasing the size of the volume is supported if the underlying storage class supports volume expansion.
12201252
The new size should be larger than actualVolumeSize in dbStatus for the volume to be resized.
12211253
type: string
1254+
dbRecovery:
1255+
description: DBRecovery (optional) configure database recovery
1256+
from snapshot
1257+
properties:
1258+
volumeSnapshotName:
1259+
description: VolumeSnapshotName specifies the name of the
1260+
volume snapshot to recover from
1261+
minLength: 1
1262+
type: string
1263+
required:
1264+
- volumeSnapshotName
1265+
type: object
12221266
dbResources:
12231267
description: DBResources (optional) overrides the default resource
12241268
requirements for the db container
@@ -1992,6 +2036,29 @@ spec:
19922036
description: ActualVolumeSize is the actual size of the postgres
19932037
cluster volume. This can be different than the requested size
19942038
type: string
2039+
backupStatus:
2040+
description: BackupStatus reports the status of database backups
2041+
properties:
2042+
availableSnapshots:
2043+
description: AvailableSnapshots list of available snapshot
2044+
names
2045+
items:
2046+
type: string
2047+
type: array
2048+
lastBackupTime:
2049+
description: LastBackupTime timestamp of the last successful
2050+
backup
2051+
format: date-time
2052+
type: string
2053+
nextBackupTime:
2054+
description: NextBackupTime timestamp of the next scheduled
2055+
backup
2056+
format: date-time
2057+
type: string
2058+
totalSnapshots:
2059+
description: TotalSnapshots current number of snapshots
2060+
type: integer
2061+
type: object
19952062
currentPgMajorVersion:
19962063
description: CurrentPgMajorVersion is the major version of the
19972064
postgres cluster
@@ -2002,6 +2069,21 @@ spec:
20022069
dbCurrentImage:
20032070
description: DBCurrentImage is the image of the postgres cluster
20042071
type: string
2072+
recoveryStatus:
2073+
description: RecoveryStatus reports the status of database recovery
2074+
properties:
2075+
recoveryTime:
2076+
description: RecoveryTime timestamp when recovery was initiated
2077+
format: date-time
2078+
type: string
2079+
snapshotName:
2080+
description: SnapshotName name of the snapshot being recovered
2081+
from
2082+
type: string
2083+
status:
2084+
description: Status current recovery status
2085+
type: string
2086+
type: object
20052087
type: object
20062088
endpoints:
20072089
description: |-

0 commit comments

Comments
 (0)