Skip to content

Commit 4b0824a

Browse files
committed
PBM-1490-Documented the ability to set file size limit for large backups
modified: docs/details/storage-configuration.md new file: docs/features/split-merge-backup.md modified: mkdocs-base.yml modified: docs/reference/configuration-options.md
1 parent e6cc6bd commit 4b0824a

File tree

5 files changed

+83
-1
lines changed

5 files changed

+83
-1
lines changed

.github/styles/config/vocabularies/Percona/accept.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ mongosh
77
[Oo]plog
88
[Ss]hard
99
PBM
10+
PLM
1011
PMM
1112
Percona Monitoring and Management
1213
Percona Backup for MongoDB
@@ -20,3 +21,5 @@ SSE
2021
UTC
2122
MinIO
2223
[Rr]esync
24+
(?i)HMAC
25+
retryer

docs/details/storage-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Percona Backup for MongoDB (PBM) saves backup data to a designated directory on
1818

1919
The oplog entries ensure backup consistency, and the end time of the oplog slice(s) is the data-consistent point in time of a backup snapshot.
2020

21-
Using the [`pbm list`](../reference/pbm-commands.md#pbm-list) or [`pbm status`](../reference/pbm-commands.md#pbm-status) commands, you can scan the backup directory to find existing backups, even if never used PBM on your computer before.
21+
Using the [`pbm list`](../reference/pbm-commands.md#pbm-list) or [`pbm status`](../reference/pbm-commands.md#pbm-status) commands, you can scan the backup directory to find existing backups, even if you never used PBM on your computer before.
2222

2323
## Supported storage types
2424

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Manage large backup files upload
2+
3+
!!! admonition "Version added: [2.11.0](../release-notes/2.11.0.md)
4+
5+
As your database grows, so do your backups. Eventually, a backup file may become so large that it exceeds the maximum object size limit of your cloud or local storage. When this happens, Percona Backup for MongoDB (PBM) can't upload the file, which can disrupt your backup strategy.
6+
7+
The following table provides default size limits for the supported backup storages:
8+
9+
| Storage | Default size limit|
10+
| :--- | :--- |
11+
| **AWS S3** | 4.9 TB |
12+
| **GCS** | 4.9 TB |
13+
| **Azure Blob Storage** | 190 TB |
14+
| **Filesystem storage** | 4.9 TB |
15+
16+
To ensure that PBM successfully uploads backups, you can configure the maximum size for backup files for the storage you use. Define the file size in GB for the `maxObjSizeGB` configuration parameter.
17+
18+
This is the configuration example for the AWS S3 storage:
19+
20+
```yaml
21+
storage:
22+
type: s3
23+
s3:
24+
region: us-west-2
25+
bucket: pbm-test-bucket
26+
prefix: data/pbm/backup
27+
credentials:
28+
access-key-id: <your-access-key-id-here>
29+
secret-access-key: <your-secret-key-here>
30+
maxObjSizeGB: 100
31+
```
32+
33+
## How it works
34+
35+
When a backup file exceeds the configured size limit, PBM does the following:
36+
37+
* Splits the file into pieces, each of which doesn't exceed the defined size limit. PBM respects your compression settings, so compressed backups stay compressed after the split
38+
* Names each piece by adding the `pbmpart{number}` token to the filename. This lets PBM identify and manage all the pieces of a single backup.
39+
* Uploads the pieces to the storage
40+
41+
When reading data for an operation like a restore, PBM automatically reverses this process: it retrieves all the pieces from storage, merges them back into a single file, and proceeds with the command. This makes the entire process transparent to your application.
42+
43+
With this ability to set the maximum file size, you can future-proof your backup strategy and gain peace of mind knowing your data is always safe and recoverable.

docs/reference/configuration-options.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ storage:
3838
numMaxRetries: 3
3939
minRetryDelay: 30ms
4040
maxRetryDelay: 5m
41+
maxObjSizeGB: 5018
4142
```
4243
4344
### storage.s3.provider
@@ -246,6 +247,14 @@ The minimum time to wait before the next retry, specified as a *time.Duration*.
246247

247248
The maximum time to wait before the next retry, specified as a *time.Duration*. Units like ms, s, etc., are supported. Defaults to nanoseconds if no unit is provided.
248249

250+
### storage.s3.maxObjSizeGB
251+
252+
*Type*: int <br>
253+
*Required*: NO <br>
254+
*Default*: 5018
255+
256+
The maximum file size to be stored on the backup storage. If the file to upload exceeds this limit, PBM splits it in pieces, each of which falls within the limit. Read more about [Managing large backup files](../features/split-merge-backup.md).
257+
249258
## GCS type storage options
250259

251260
```yaml
@@ -260,6 +269,7 @@ storage:
260269
privateKey: <your-private-key-here>
261270
hmacAccessKey: <your-HMAC-key-here>
262271
hmacSecret: <your-HMAC-secret-here>
272+
maxObjSizeGB: 5018
263273
```
264274

265275
### storage.gcs.bucket
@@ -332,13 +342,22 @@ The maximum amount of time between retries, in seconds. Defaults to 30 sec.
332342

333343
Each time PBM fails and tries again, it increases the wait time by multiplying it by this number (usually 2). For example, if the first wait time is 1 second, the next will be 2 seconds, then 4 seconds, and so on, until it reaches the maximum. Default value is 2 sec.
334344

345+
### storage.gcs.maxObjSizeGB
346+
347+
*Type*: int <br>
348+
*Required*: NO <br>
349+
*Default*: 5018
350+
351+
The maximum file size to be stored on the backup storage. If the file to upload exceeds this limit, PBM splits it in pieces, each of which falls within the defined limit. Read more about [Managing large backup files](../features/split-merge-backup.md).
352+
335353
## Filesystem storage options
336354

337355
```yaml
338356
storage:
339357
type: filesystem
340358
filesystem:
341359
path: <string>
360+
maxObjSizeGB: 5018
342361
```
343362

344363
### storage.filesystem.path
@@ -348,6 +367,14 @@ storage:
348367

349368
The path to the backup directory
350369

370+
### storage.filesystem.maxObjSizeGB
371+
372+
*Type*: int <br>
373+
*Required*: NO <br>
374+
*Default*: 5018
375+
376+
The maximum file size to be stored on the backup storage. If the file to upload exceeds this limit, PBM splits it in pieces, each of which falls within the defined limit. Read more about [Managing large backup files](../features/split-merge-backup.md).
377+
351378
## Microsoft Azure Blob storage options
352379

353380
```yaml
@@ -360,6 +387,7 @@ storage:
360387
prefix: <string>
361388
credentials:
362389
key: <your-access-key>
390+
maxObjSizeGB: 194560
363391
```
364392

365393
### storage.azure.account
@@ -397,3 +425,10 @@ The path to the data directory in the bucket. If undefined, backups are stored i
397425

398426
Your access key to authorize access to data in your storage account.
399427

428+
### storage.azure.maxObjSizeGB
429+
430+
*Type*: int <br>
431+
*Required*: NO <br>
432+
*Default*: 194560
433+
434+
The maximum file size to be stored on the backup storage. If the file to upload exceeds this limit, PBM splits it in pieces, each of which falls within the defined limit. Read more about [Managing large backup files](../features/split-merge-backup.md).

mkdocs-base.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ nav:
233233
- details/filesystem-storage.md
234234
- details/azure.md
235235
- features/multi-storage.md
236+
- features/split-merge-backup.md
236237
- PBM commands: reference/pbm-commands.md
237238
- Configuration file:
238239
- Percona Backup for MongoDB configuration in a cluster: reference/config.md

0 commit comments

Comments
 (0)