@softistx/mongo-backup 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/README.md CHANGED
@@ -25,4 +25,4 @@ The [README](../README.md) is the short version: install, the key file,
25
25
  one example for `run`, `restore` and `drill`, the lower level, the API, the
26
26
  errors and the traps. Repositories, keys,
27
27
  signing, rotation and the chain rules are `@softistx/backup`'s —
28
- [its documentation](https://github.com/softistx/nxgt-data/tree/develop/packages/backup/docs).
28
+ [its documentation](https://github.com/softistx/data/tree/develop/packages/backup/docs).
@@ -304,7 +304,7 @@ repositories, `tmpDir` — when it is called, so none of `defineBackup`'s or
304
304
  before they reach a shared log, or log `error.code` and `error.name` only.
305
305
  - **`@softistx/backup`'s** — `NOT_FOUND`, `INTEGRITY`, `DECRYPT`, `LOCKED`,
306
306
  `PARTIAL`, … — are its own `BackupError`, documented with it:
307
- [errors](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/errors.md).
307
+ [errors](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/errors.md).
308
308
 
309
309
  ## A handler for a scheduled job
310
310
 
@@ -22,7 +22,7 @@ await backups.restore(latest.id, directoryTarget({ path: '/srv/inspect' }), {
22
22
 
23
23
  How entries are compressed, encrypted and stored — `0.age`, the catalog,
24
24
  the manifest — is `@softistx/backup`'s
25
- [format](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/format.md).
25
+ [format](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/format.md).
26
26
  What follows is what is inside each entry.
27
27
 
28
28
  ## The entries
@@ -176,4 +176,4 @@ A `documents/<collection>` file is what `mongodump` would have written as
176
176
  `<collection>.bson`. `directoryTarget` refuses an entry whose name is not a
177
177
  safe relative path, so a collection named with a `\` or a `..` segment
178
178
  needs a target of your own — `@softistx/backup`'s
179
- [sources and targets](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/sources-and-targets.md#writing-a-target).
179
+ [sources and targets](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/sources-and-targets.md#writing-a-target).
@@ -155,7 +155,7 @@ DEFAULT_KEEP; // { last: 24, daily: 14, weekly: 8, monthly: 12 }
155
155
  `DEFAULT_KEEP` keeps a day hour by hour, two weeks day by day, two months
156
156
  week by week and a year month by month. A rotation never breaks a chain: a
157
157
  kept incremental keeps what it builds on —
158
- [`@softistx/backup`'s rotation](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/rotation.md).
158
+ [`@softistx/backup`'s rotation](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/rotation.md).
159
159
 
160
160
  **`mongoBackups` checks its options at once**, and throws a bare
161
161
  `TypeError`:
@@ -489,7 +489,7 @@ await backups.restore(created.id, mongoTarget({ db: client.db('shop-restored') }
489
489
 
490
490
  `defineBackup`, `bindBackup`, the keys and the repositories are
491
491
  `@softistx/backup`'s; its
492
- [getting started](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/getting-started.md)
492
+ [getting started](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/getting-started.md)
493
493
  covers them.
494
494
 
495
495
  ## `mongoSource`
@@ -34,7 +34,7 @@ await backups.restore(tuesday.id, mongoTarget({ db: client.db('shop-restored') }
34
34
 
35
35
  Which backup each kind builds on, the key it needs on the host that makes
36
36
  it, and how `prune` keeps a chain are `@softistx/backup`'s rules —
37
- [chains](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/chains.md).
37
+ [chains](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/chains.md).
38
38
  This page is about what `mongoSource` adds to them.
39
39
 
40
40
  ## One more entry: `changes/<n>`
@@ -307,7 +307,7 @@ too, with the same code: leave the collection out with `collections`.
307
307
  Either way a restore reads the full backup's collections whole, then
308
308
  applies changes; what grows with an incremental chain is the number of
309
309
  backups that must be there, intact — `@softistx/backup`'s
310
- [chains](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/chains.md#a-typical-schedule).
310
+ [chains](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/chains.md#a-typical-schedule).
311
311
 
312
312
  ## Errors
313
313
 
@@ -4,7 +4,7 @@ This page puts `mongoBackups` on a schedule: the key file and where it
4
4
  lives, the job, how you know it works, and the `restore` call to make on
5
5
  the day you need a backup back. Each method is documented on
6
6
  [getting started](getting-started.md#what-it-returns). The repository's
7
- [`examples/mongo-backup-job`](https://github.com/softistx/nxgt-data/tree/develop/examples/mongo-backup-job)
7
+ [`examples/mongo-backup-job`](https://github.com/softistx/data/tree/develop/examples/mongo-backup-job)
8
8
  is this page as code, with a spec that runs the whole cycle against a
9
9
  replica set.
10
10
 
@@ -96,7 +96,7 @@ const report = await backups.run();
96
96
  (`DEFAULT_KEEP`: a day hourly, two weeks daily, two months weekly, a year
97
97
  monthly). A kept incremental keeps the backups it builds on, so a
98
98
  rotation never breaks a chain —
99
- [`@softistx/backup`'s rotation](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/rotation.md).
99
+ [`@softistx/backup`'s rotation](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/rotation.md).
100
100
  `keep: false` leaves the rotation to you.
101
101
  - **One writer at a time**: `create` and `prune` take the repository's
102
102
  lock, so a run that overlaps the last one fails rather than interleave.
@@ -104,7 +104,7 @@ const report = await backups.run();
104
104
  another repository took it — the `LOCKED` in that repository's outcome;
105
105
  the rotation rejects with `LOCKED`, after the backup was made and read
106
106
  back —
107
- [as `@softistx/backup`'s locking shows](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/guide/locking.md).
107
+ [as `@softistx/backup`'s locking shows](https://github.com/softistx/data/blob/develop/packages/backup/docs/guide/locking.md).
108
108
  Let the scheduler skip such a run, not retry it in a loop.
109
109
  - **Anything else is thrown** as it is: `UNSUPPORTED`, `CHANGING`,
110
110
  `SNAPSHOT_TOO_OLD`, a driver error. A run that fails while backing up
@@ -27,7 +27,7 @@ try {
27
27
  ```
28
28
 
29
29
  The errors of `@softistx/backup` itself — keys, repositories, locks, chains —
30
- are on [its own troubleshooting page](https://github.com/softistx/nxgt-data/blob/develop/packages/backup/docs/troubleshooting.md);
30
+ are on [its own troubleshooting page](https://github.com/softistx/data/blob/develop/packages/backup/docs/troubleshooting.md);
31
31
  the few you meet first with this package are repeated below. Their headings
32
32
  use `app` for the definition's name and `local` for the repository's.
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softistx/mongo-backup",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "MongoDB for @softistx/backup: a full backup read at one cluster time, incremental ones from the change stream, and a restore that lands each collection whole or not at all",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "repository": {
38
38
  "type": "git",
39
- "url": "git+https://github.com/softistx/nxgt-data.git",
39
+ "url": "git+https://github.com/softistx/data.git",
40
40
  "directory": "packages/mongo-backup"
41
41
  },
42
42
  "publishConfig": {
@@ -55,13 +55,13 @@
55
55
  ]
56
56
  },
57
57
  "devDependencies": {
58
- "@softistx/backup": "^0.7.1",
59
- "@types/bun": "^1.4.4",
60
- "mongodb": "7.6.0",
61
- "mongodb-memory-server-core": "11.2.0"
58
+ "@softistx/backup": "^0.7.2",
59
+ "@types/bun": "^1.4.5",
60
+ "mongodb": "7.9.1",
61
+ "mongodb-memory-server-core": "11.4.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "@softistx/backup": "^0.7.1",
64
+ "@softistx/backup": "^0.7.2",
65
65
  "mongodb": ">=7.0.0 <8",
66
66
  "typescript": "^6.0.3 || ^7.0.0"
67
67
  },