Welcome to Percona Backup for MongoDB!
We're glad that you would like to become a Percona community member and participate in keeping open source open.
Percona Backup for MongoDB (PBM) is a distributed, low-impact solution for achieving consistent backups of MongoDB sharded clusters and replica sets.
You can contribute in one of the following ways:
- Reach us on our Forums.
- Submit a bug report or a feature request
- Submit a pull request (PR) with the code patch
- Contribute to documentation
Before submitting code contributions, we ask you to complete the following prerequisites.
Before you can contribute, we kindly ask you to sign our Contributor License Agreement (CLA). You can do this in on click using your GitHub account.
Note: You can sign it later, when submitting your first pull request. The CLA assistant validates the PR and asks you to sign the CLA to proceed.
Please make sure to read and agree to our Code of Conduct.
All bug reports, enhancements and feature requests are tracked in Jira issue tracker. Though not mandatory, we encourage you to first check for a bug report among Jira issues and in the PR list: perhaps the bug has already been addressed.
For feature requests and enhancements, we do ask you to create a Jira issue, describe your idea and discuss the design with us. This way we align your ideas with our vision for the product development.
If the bug hasn’t been reported / addressed, or we’ve agreed on the enhancement implementation with you, do the following:
- Fork this repository
- Clone this repository on your machine.
- Create a separate branch for your changes. If you work on a Jira issue, please include the issue number in the branch name so it reads as
<JIRAISSUE>-my_branch
. This makes it easier to track your contribution. - Make your changes. Please follow the guidelines outlined in the Go Code Review Comments to improve code readability.
- Test your changes locally. See the Running tests locally section for more information
- Commit the changes. Add the Jira issue number at the beginning of your message subject so that is reads as
<JIRAISSUE> - My subject
. The commit message guidelines will help you with writing great commit messages - Open a PR to Percona
- Our team will review your code and if everything is correct, will merge it. Otherwise, we will contact you for additional information or with the request to make changes.
To build Percona Backup for MongoDB from source code, you require the following:
- Go 1.22 or above. See Installing and setting up Go tools for more information
- make
krb5-devel
for Red Hat Enterprise Linux / CentOS orlibkrb5-dev
for Debian / Ubuntu. This package is required for Kerberos authentication in Percona Server for MongoDB.
To build the project, run the following commands:
$ git clone https://github.com/<your_name>/percona-backup-mongodb
$ cd percona-backup-mongodb
$ make build
After make
completes, you can find pbm
and pbm-agent
binaries in the ./bin
directory:
$ cd bin
$ ./pbm version
By running pbm version
, you can verify if Percona Backup for MongoDB has been built correctly and is ready for use.
Output
Version: [pbm version number]
Platform: linux/amd64
GitCommit: [commit hash]
GitBranch: master
BuildTime: [time when this version was produced in UTC format]
GoVersion: [Go version number]
TIP: instead of specifying the path to pbm binaries, you can add it to the PATH environment variable:
export PATH=/percona-backup-mongodb/bin:$PATH
When you work, you should periodically run tests to check that your changes don’t break existing code.
You can find the tests in the e2e-tests
directory.
To save time on tests execution during development, we recommend running general and consistency tests for a sharded cluster:
$ MONGODB_VERSION=5.0 ./run-sharded
$ MONGODB_VERSION
stands for the Percona Server for MongoDB version Percona Backup for MongoDB is running with. Default is 5.0.
After the development is complete and you are ready to submit a pull request, run all tests using the following command:
$ MONGODB_VERSION=5.0 ./run-all
You can run tests on your local machine with whatever operating system you have. After you submit the pull request, we will check your patch on multiple operating systems.
We welcome contributions to our documentation.
Documentation source files are in the dedicated docs repository. The contents of the doc
folder is outdated and will be removed.
Please follow the Docs contributing guidelines for how to contribute to documentation.
Once your pull request is merged, you are an official Percona Community Contributor. Welcome to the community!