Skip to content

Commit 60f3393

Browse files
committed
Update README.md for gpbackup
1 parent 1c36770 commit 60f3393

File tree

2 files changed

+55
-72
lines changed

2 files changed

+55
-72
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "\U0001F41B Bug Report"
2-
description: Problems and issues with code in gp-common-go-libs for CloudberryDB.
2+
description: Problems and issues with code in gpbackup for CloudberryDB.
33
title: "[Bug] "
44
labels: ["type: Bug"]
55
body:
@@ -8,7 +8,7 @@ body:
88
value: "Thank you for reporting the problem! We really appreciate your efforts to improve Cloudberry Database. Before reporting it, please (ideally) test on the latest release or main to see if the issue is fixed."
99
- type: textarea
1010
attributes:
11-
label: Cloudberry Database version
11+
label: Cloudberry Database and gpbackup version
1212
description: What version are you using?
1313
- type: textarea
1414
attributes:

README.md

Lines changed: 53 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,28 @@
99
---
1010

1111
`gpbackup` and `gprestore` are Go utilities for performing Greenplum database
12-
backups, which are developed by Greenplum Database team. This repo is a fork
13-
of gpbackup, dedicated to support CloduberryDB 1.0+. You will feel no change
14-
using gpbackup in CloudberryDB just as well in Greenplum.
12+
backups, which are originally developed by the Greenplum Database team. This
13+
repo is a fork of gpbackup, dedicated to supporting CloduberryDB 1.0+. You
14+
will feel no change using gpbackup in CloudberryDB as well as in Greenplum.
1515

1616
## Pre-Requisites
1717

1818
The project requires the Go Programming language version 1.11 or higher.
1919
Follow the directions [here](https://golang.org/doc/) for installation, usage
20-
and configuration instructions.
20+
and configuration instructions. Make sure to set the [Go PATH environment
21+
variable](https://go.dev/doc/install) before starting the following steps.
2122

22-
## Downloading
23+
## Download & Build
24+
25+
1. Downloading the latest version:
2326

2427
```bash
25-
go get github.com/cloudberrydb/gpbackup/...
28+
go install github.com/cloudberrydb/gpbackup@latest
2629
```
2730

28-
This will place the code in `$GOPATH/github.com/greenplum-db/gpbackup`.
31+
This will place the code in `$GOPATH/pkg/mod/github.com/cloudberrydb/gpbackup`.
2932

30-
## Building and installing binaries
33+
2. Building and installing binaries
3134

3235
Make the `gpbackup` directory your current working directory and run:
3336

@@ -36,97 +39,77 @@ make depend
3639
make build
3740
```
3841

39-
The `build` target will put the `gpbackup` and `gprestore` binaries in `$HOME/go/bin`.
40-
41-
This will also attempt to copy `gpbackup_helper` to the greenplum segments (retrieving hostnames from `gp_segment_configuration`). Pay attention to the output as it will indicate whether this operation was successful.
42+
The `build` target will put the `gpbackup` and `gprestore` binaries in
43+
`$HOME/go/bin`. This will also attempt to copy `gpbackup_helper` to the
44+
CloudberryDB segments (retrieving hostnames from `gp_segment_configuration`).
45+
Pay attention to the output as it will indicate whether this operation was
46+
successful.
4247

4348
`make build_linux` is for cross compiling on macOS, and the target is Linux.
4449

4550
`make install` will scp the `gpbackup_helper` binary (used with -single-data-file flag) to all hosts
4651

52+
## Running the utilities
53+
54+
The basic command for gpbackup is
55+
```bash
56+
gpbackup --dbname <your_db_name>
57+
```
58+
59+
The basic command for gprestore is
60+
```bash
61+
gprestore --timestamp <YYYYMMDDHHMMSS>
62+
```
63+
64+
Run `--help` with either command for a complete list of options.
65+
4766
## Validation and code quality
4867

4968
### Test setup
5069

51-
Required for Greenplum Database 6 or higher, several tests require the `dummy_seclabel` Greenplum contrib module. This module exists only to support regression testing of the SECURITY LABEL statement. It is not intended to be used in production. Use the following commands to install the module.
70+
Required for Cloudberry Database 1.0+, several tests require the
71+
`dummy_seclabel` Cloudberry Database contrib module. This module exists only
72+
to support regression testing of the SECURITY LABEL statement. It is not
73+
intended to be used in production. Use the following commands to install the
74+
module.
5275

5376
```bash
54-
pushd $(find ~/workspace/gpdb -name dummy_seclabel)
77+
pushd $(find ~/workspace/cbdb -name dummy_seclabel)
5578
make install
5679
gpconfig -c shared_preload_libraries -v dummy_seclabel
5780
gpstop -ra
5881
gpconfig -s shared_preload_libraries | grep dummy_seclabel
5982
popd
60-
6183
```
6284

6385
### Test execution
6486

65-
**NOTE**: The integration and end_to_end tests require a running Greenplum Database instance.
66-
67-
To run all tests except end-to-end (linters, unit, and integration), use
68-
```bash
69-
make test
70-
```
71-
To run only unit tests, use
72-
```bash
73-
make unit
74-
```
75-
To run only integration tests (requires a running GPDB instance), use
76-
77-
```
78-
make integration
79-
```
87+
**NOTE**: The integration and end_to_end tests require a running Cloudberry
88+
Database instance.
8089

81-
To run end to end tests (requires a running GPDB instance), use
82-
```bash
83-
make end_to_end
84-
```
90+
* To run all tests except end-to-end (linters, unit, and integration), use `make test`.
91+
* To run only unit tests, use `make unit`.
92+
* To run only integration tests (requires a running CloudberryDB instance), use `make integration`.
93+
* To run end to end tests (requires a running CloudberryDB instance), use `make end_to_end`.
8594

86-
**We provide the following targets to help developers ensure their code fits
87-
Go standard formatting guidelines.**
95+
We provide the following targets to help developers ensure their code fits
96+
Go standard formatting guidelines:
8897

89-
To run a linting tool that checks for basic coding errors, use
90-
```bash
91-
make lint
92-
```
98+
* To run a linting tool that checks for basic coding errors, use: `make lint`.
9399
This target runs [gometalinter](https://github.com/alecthomas/gometalinter).
94-
95100
Note: The lint target will fail if code is not formatted properly.
96101

97-
98-
To automatically format your code and add/remove imports, use
99-
```bash
100-
make format
101-
```
102-
102+
* To automatically format your code and add/remove imports, use `make format`.
103103
This target runs
104104
[goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) and
105105
[gofmt](https://golang.org/cmd/gofmt/). We will only accept code that has been
106106
formatted using this target or an equivalent `gofmt` call.
107107

108-
## Running the utilities
108+
### Cleaning up
109109

110-
The basic command for gpbackup is
111-
```bash
112-
gpbackup --dbname <your_db_name>
113-
```
114-
115-
The basic command for gprestore is
116-
```bash
117-
gprestore --timestamp <YYYYMMDDHHMMSS>
118-
```
119-
120-
Run `--help` with either command for a complete list of options.
121-
122-
## Cleaning up
123-
124-
To remove the compiled binaries and other generated files, run
125-
```bash
126-
make clean
127-
```
110+
To remove the compiled binaries and other generated files, run `make clean`.
128111

129-
# Code Formatting
112+
## Code Formatting
130113

131114
We use `goimports` to format go code. See
132115
https://godoc.org/golang.org/x/tools/cmd/goimports The following command
@@ -137,12 +120,12 @@ the files updated.
137120
goimports -w -l $(find . -type f -name '*.go' -not -path "./vendor/*")
138121
```
139122

140-
# Troubleshooting
123+
## Troubleshooting
141124

142-
## Dummy Security Label module is not installed or configured
125+
1. Dummy Security Label module is not installed or configured
143126

144127
If you see errors in many integration tests (below), review the Validation and
145-
code quality [Test setup](#Test setup) section above:
128+
code quality [Test setup](##Test setup) section above:
146129

147130
```
148131
SECURITY LABEL FOR dummy ON TYPE public.testtype IS 'unclassified';
@@ -153,7 +136,7 @@ SECURITY LABEL FOR dummy ON TYPE public.testtype IS 'unclassified';
153136
Message: "security label provider \"dummy\" is not loaded",
154137
```
155138

156-
## Tablespace already exists
139+
2. Tablespace already exists
157140

158141
If you see errors indicating the `test_tablespace` tablespace already exists
159142
(below), execute `psql postgres -c 'DROP TABLESPACE test_tablespace'` to

0 commit comments

Comments
 (0)