Skip to content

Commit 5410fd4

Browse files
committed
Update the information fields for CloudberryDB
Update the fields on CloudberryDB to improve the experience when users run the gpbackup tool.
1 parent 6695503 commit 5410fd4

File tree

8 files changed

+36
-36
lines changed

8 files changed

+36
-36
lines changed

backup/backup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func DoSetup() {
5050
timestamp := history.CurrentTimestamp()
5151
createBackupLockFile(timestamp)
5252
initializeConnectionPool(timestamp)
53-
gplog.Info("Greenplum Database Version = %s", connectionPool.Version.VersionString)
53+
gplog.Info("Cloudberry Database Version = %s", connectionPool.Version.VersionString)
5454

5555
gplog.Info("Starting backup of database %s", MustGetFlagString(options.DBNAME))
5656
opts, err := options.NewOptions(cmdFlags)

end_to_end/locks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ var _ = Describe("Deadlock handling", func() {
289289
})
290290
It("runs gpbackup and defers 2 deadlocked tables to main worker", func() {
291291
if true {
292-
Skip(fmt.Sprintf("This test is not needed for old backup versions or GPDB versions < %s", backup.SNAPSHOT_GPDB_MIN_VERSION))
292+
Skip(fmt.Sprintf("This test is not needed for old backup versions or CloudberryDB versions < %s", backup.SNAPSHOT_GPDB_MIN_VERSION))
293293
}
294294
// Acquire AccessExclusiveLock on public.foo to block gpbackup when it attempts
295295
// to grab AccessShareLocks before its metadata dump section.

gppkg/gpbackup_tools.spec.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Name: gpbackup_tools_%{operating_system}
22
Version: %{rpm_version}
33
Release: 1
4-
Summary: Backup and restore utilities for Greenplum
4+
Summary: Backup and restore utilities for CloudberryDB
55
License: Pivotal Software EULA
66
Source0: bin_gpbackup.tar.gz
77
BuildArch: x86_64
@@ -11,7 +11,7 @@ Prefix: /usr/local
1111
AutoReqProv: no
1212

1313
%description
14-
Backup and restore utilities for Greenplum
14+
Backup and restore utilities for CloudberryDB
1515

1616
%prep
1717
%setup -c -q -T -D -a 0

integration/gpexpand_not_running_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var _ = Describe("gpexpand_sensor", func() {
4141
}
4242
}()
4343

44-
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-Greenplum expansion currently in process. Once expansion is complete, it will be possible to restart gprestore, but please note existing backup sets taken with a different cluster configuration may no longer be compatible with the newly expanded cluster configuration`)
44+
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-CloudberryDB expansion currently in process. Once expansion is complete, it will be possible to restart gprestore, but please note existing backup sets taken with a different cluster configuration may no longer be compatible with the newly expanded cluster configuration`)
4545
restore.DoSetup()
4646
})
4747
It("should prevent gprestore from starting when gpexpand is in phase 2", func() {
@@ -54,7 +54,7 @@ var _ = Describe("gpexpand_sensor", func() {
5454
testhelper.AssertQueryRuns(postgresConn, "CREATE TABLE gpexpand.status (status text, updated timestamp)")
5555
testhelper.AssertQueryRuns(postgresConn, "INSERT INTO gpexpand.status VALUES ('IN PROGRESS', now())")
5656

57-
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-Greenplum expansion currently in process. Once expansion is complete, it will be possible to restart gprestore, but please note existing backup sets taken with a different cluster configuration may no longer be compatible with the newly expanded cluster configuration`)
57+
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-CloudberryDB expansion currently in process. Once expansion is complete, it will be possible to restart gprestore, but please note existing backup sets taken with a different cluster configuration may no longer be compatible with the newly expanded cluster configuration`)
5858
restore.DoSetup()
5959
})
6060
It("should prevent gpbackup from starting when gpexpand is in phase 1", func() {
@@ -76,7 +76,7 @@ var _ = Describe("gpexpand_sensor", func() {
7676
}
7777
}()
7878

79-
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-Greenplum expansion currently in process, please re-run gpbackup when the expansion has completed`)
79+
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-CloudberryDB expansion currently in process, please re-run gpbackup when the expansion has completed`)
8080
backup.DoSetup()
8181
})
8282
It("should prevent gpbackup from starting when gpexpand is in phase 2", func() {
@@ -89,7 +89,7 @@ var _ = Describe("gpexpand_sensor", func() {
8989
testhelper.AssertQueryRuns(postgresConn, "CREATE TABLE gpexpand.status (status text, updated timestamp)")
9090
testhelper.AssertQueryRuns(postgresConn, "INSERT INTO gpexpand.status VALUES ('IN PROGRESS', now())")
9191

92-
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-Greenplum expansion currently in process, please re-run gpbackup when the expansion has completed`)
92+
defer testhelper.ShouldPanicWithMessage(`[CRITICAL]:-CloudberryDB expansion currently in process, please re-run gpbackup when the expansion has completed`)
9393
backup.DoSetup()
9494
})
9595
})

report/report.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (report *Report) WriteBackupReportFile(reportFilename string, timestamp str
127127
reportInfo := make([]LineInfo, 0)
128128
reportInfo = append(reportInfo,
129129
LineInfo{Key: "timestamp key:", Value: timestamp},
130-
LineInfo{Key: "gpdb version:", Value: report.DatabaseVersion},
130+
LineInfo{Key: "database version:", Value: report.DatabaseVersion},
131131
LineInfo{Key: "gpbackup version:", Value: fmt.Sprintf("%s\n", report.BackupVersion)},
132132
LineInfo{Key: "database name:", Value: report.DatabaseName},
133133
LineInfo{Key: "command line:", Value: gpbackupCommandLine},
@@ -159,7 +159,7 @@ func (report *Report) WriteBackupReportFile(reportFilename string, timestamp str
159159
reportInfo = append(reportInfo,
160160
LineInfo{Key: "segment count:", Value: fmt.Sprintf("%d", report.SegmentCount)})
161161

162-
_, err = fmt.Fprint(reportFile, "Greenplum Database Backup Report\n\n")
162+
_, err = fmt.Fprint(reportFile, "Cloudberry Database Backup Report\n\n")
163163
if err != nil {
164164
gplog.Error("Unable to write backup report file %s", reportFilename)
165165
return
@@ -184,12 +184,12 @@ func WriteRestoreReportFile(reportFilename string, backupTimestamp string, start
184184
gprestoreCommandLine := strings.Join(os.Args, " ")
185185
start, end, duration := GetDurationInfo(startTimestamp, operating.System.Now())
186186

187-
utils.MustPrintf(reportFile, "Greenplum Database Restore Report\n\n")
187+
utils.MustPrintf(reportFile, "Cloudberry Database Restore Report\n\n")
188188

189189
reportInfo := make([]LineInfo, 0)
190190
reportInfo = append(reportInfo,
191191
LineInfo{Key: "timestamp key:", Value: backupTimestamp},
192-
LineInfo{Key: "gpdb version:", Value: connectionPool.Version.VersionString},
192+
LineInfo{Key: "database version:", Value: connectionPool.Version.VersionString},
193193
LineInfo{Key: "gprestore version:", Value: fmt.Sprintf("%s\n", restoreVersion)},
194194
LineInfo{Key: "database name:", Value: connectionPool.DBName},
195195
LineInfo{Key: "command line:", Value: fmt.Sprintf("%s\n", gprestoreCommandLine)},

report/report_test.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ data file format: Single Data File Per Segment`,
9494

9595
It("writes a report for a successful backup", func() {
9696
backupReport.WriteBackupReportFile("filename", timestamp, endtime, objectCounts, "")
97-
Expect(buffer).To(Say(`Greenplum Database Backup Report
97+
Expect(buffer).To(Say(`Cloudberry Database Backup Report
9898
9999
timestamp key: 20170101010101
100-
gpdb version: 5\.0\.0 build test
101-
gpbackup version: 0\.1\.0
100+
database version: 5.0.0 build test
101+
gpbackup version: 0.1.0
102102
103103
database name: testdb
104104
command line: .*
@@ -124,11 +124,11 @@ types 1000`))
124124
})
125125
It("writes a report for a failed backup", func() {
126126
backupReport.WriteBackupReportFile("filename", timestamp, endtime, objectCounts, "Cannot access /tmp/backups: Permission denied")
127-
Expect(buffer).To(Say(`Greenplum Database Backup Report
127+
Expect(buffer).To(Say(`Cloudberry Database Backup Report
128128
129129
timestamp key: 20170101010101
130-
gpdb version: 5\.0\.0 build test
131-
gpbackup version: 0\.1\.0
130+
database version: 5.0.0 build test
131+
gpbackup version: 0.1.0
132132
133133
database name: testdb
134134
command line: .*
@@ -156,11 +156,11 @@ types 1000`))
156156
It("writes a report without database size information", func() {
157157
backupReport.DatabaseSize = ""
158158
backupReport.WriteBackupReportFile("filename", timestamp, endtime, objectCounts, "")
159-
Expect(buffer).To(Say(`Greenplum Database Backup Report
159+
Expect(buffer).To(Say(`Cloudberry Database Backup Report
160160
161161
timestamp key: 20170101010101
162-
gpdb version: 5\.0\.0 build test
163-
gpbackup version: 0\.1\.0
162+
database version: 5.0.0 build test
163+
gpbackup version: 0.1.0
164164
165165
database name: testdb
166166
command line: .*
@@ -245,11 +245,11 @@ incremental backup set:
245245
It("writes a report for a failed restore", func() {
246246
gplog.SetErrorCode(2)
247247
report.WriteRestoreReportFile("filename", timestamp, restoreStartTime, connectionPool, restoreVersion, 3, 4, "Cannot access /tmp/backups: Permission denied")
248-
Expect(buffer).To(Say(`Greenplum Database Restore Report
248+
Expect(buffer).To(Say(`Cloudberry Database Restore Report
249249
250250
timestamp key: 20170101010101
251-
gpdb version: 5\.0\.0 build test
252-
gprestore version: 0\.1\.0
251+
database version: 5.0.0 build test
252+
gprestore version: 0.1.0
253253
254254
database name: testdb
255255
command line: .*
@@ -266,11 +266,11 @@ restore error: Cannot access /tmp/backups: Permission denied`))
266266
It("writes a report for a successful restore", func() {
267267
gplog.SetErrorCode(0)
268268
report.WriteRestoreReportFile("filename", timestamp, restoreStartTime, connectionPool, restoreVersion, 3, 3, "")
269-
Expect(buffer).To(Say(`Greenplum Database Restore Report
269+
Expect(buffer).To(Say(`Cloudberry Database Restore Report
270270
271271
timestamp key: 20170101010101
272-
gpdb version: 5\.0\.0 build test
273-
gprestore version: 0\.1\.0
272+
database version: 5.0.0 build test
273+
gprestore version: 0.1.0
274274
275275
database name: testdb
276276
command line: .*
@@ -286,11 +286,11 @@ restore status: Success`))
286286
It("writes a report for a successful restore with errors", func() {
287287
gplog.SetErrorCode(1)
288288
report.WriteRestoreReportFile("filename", timestamp, restoreStartTime, connectionPool, restoreVersion, 3, 3, "")
289-
Expect(buffer).To(Say(`Greenplum Database Restore Report
289+
Expect(buffer).To(Say(`Cloudberry Database Restore Report
290290
291291
timestamp key: 20170101010101
292-
gpdb version: 5\.0\.0 build test
293-
gprestore version: 0\.1\.0
292+
database version: 5.0.0 build test
293+
gprestore version: 0.1.0
294294
295295
database name: testdb
296296
command line: .*
@@ -426,7 +426,7 @@ restore status: Success but non-fatal errors occurred. See log file .+
426426
})
427427

428428
Describe("Email-related functions", func() {
429-
reportFileContents := []byte(`Greenplum Database Backup Report
429+
reportFileContents := []byte(`Cloudberry Database Backup Report
430430
431431
Timestamp Key: 20170101010101`)
432432
contactsFileContents, _ := yaml.Marshal(report.ContactFile{
@@ -534,7 +534,7 @@ Content-Disposition: inline
534534
<html>
535535
<body>
536536
<pre style=\"font: monospace\">
537-
Greenplum Database Backup Report
537+
Cloudberry Database Backup Report
538538
539539
Timestamp Key: 20170101010101
540540
</pre>
@@ -556,7 +556,7 @@ Content-Disposition: inline
556556
<html>
557557
<body>
558558
<pre style=\"font: monospace\">
559-
Greenplum Database Backup Report
559+
Cloudberry Database Backup Report
560560
561561
Timestamp Key: 20170101010101
562562
</pre>

restore/restore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func DoSetup() {
8787

8888
gplog.Info("gpbackup version = %s", backupConfig.BackupVersion)
8989
gplog.Info("gprestore version = %s", GetVersion())
90-
gplog.Info("Greenplum Database Version = %s", connectionPool.Version.VersionString)
90+
gplog.Info("Database Version = %s", connectionPool.Version.VersionString)
9191

9292
BackupConfigurationValidation()
9393
metadataFilename := globalFPInfo.GetMetadataFilePath()

utils/gpexpand_sensor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
)
1313

1414
const (
15-
BackupPreventedByGpexpandMessage GpexpandFailureMessage = `Greenplum expansion currently in process, please re-run gpbackup when the expansion has completed`
15+
BackupPreventedByGpexpandMessage GpexpandFailureMessage = `CloudberryDB expansion currently in process, please re-run gpbackup when the expansion has completed`
1616

17-
RestorePreventedByGpexpandMessage GpexpandFailureMessage = `Greenplum expansion currently in process. Once expansion is complete, it will be possible to restart gprestore, but please note existing backup sets taken with a different cluster configuration may no longer be compatible with the newly expanded cluster configuration`
17+
RestorePreventedByGpexpandMessage GpexpandFailureMessage = `CloudberryDB expansion currently in process. Once expansion is complete, it will be possible to restart gprestore, but please note existing backup sets taken with a different cluster configuration may no longer be compatible with the newly expanded cluster configuration`
1818

1919
CoordinatorDataDirQuery = `select datadir from gp_segment_configuration where content=-1 and role='p'`
2020
GpexpandTemporaryTableStatusQuery = `SELECT status FROM gpexpand.status ORDER BY updated DESC LIMIT 1`

0 commit comments

Comments
 (0)