| What a restore carries across |
Key schema, attribute definitions, items, secondary indexes, billing mode and provisioned throughput, on-demand throughput (table and GSI level), SSE settings. Table class is not carried: a restore is STANDARD whatever the source's class (measured). Stream settings, TTL, tags, auto scaling, IAM policies, and CloudWatch settings must be reapplied by hand. DescribeTable on a freshly restored table reports ItemCount 0 and TableSizeBytes 0 (measured on 15 restored tables, one of them ten minutes after ACTIVE) |
The same set on all four backends, with one gap: the table's on-demand throughput is carried, a GSI's is not (ExtendDB records no per-index on-demand maximum, and OnDemandThroughput is not a member of its GSI definition). Table class is not restored: a STANDARD_INFREQUENT_ACCESS source restores as STANDARD, as on the service. Streams, TTL, tags, and deletion protection are not restored. DescribeTable on a restored table reports ItemCount 0 and TableSizeBytes 0 when the table goes ACTIVE, as the service does (measured: 0 and 0 on 15 restored tables, one of them ten minutes after it went ACTIVE), until the statistics pass next rewrites both from the restored rows (from the code). A backup written before catalog 0.0.4 (PostgreSQL, SQLite, Cassandra) has no recorded table definition and restores with its keys, items, and billing mode but no secondary indexes. A provisioned one restores with 5/5 throughput on PostgreSQL and SQLite and with its recorded throughput on Cassandra |
How RestoreTableFromBackup runs |
Returns at once with the target CREATING; the service copies in the background |
The same on all four backends: the response carries the target CREATING, and the items are copied by a background task in the server, so a client that times out or disconnects does not stop it. Once the request has been authenticated and authorized, the rest of it, from reading the backup to registering the restore, runs in a task of its own, so a client that disconnects after that does not cancel it either: the restore runs and the client finds the target with DescribeTable. A client that disconnects while the request is still being authenticated or authorized cancels it, and nothing is created (from the code). Measured with a client whose 1 ms read timeout closed its connection before any response arrived: on all four backends the restore was registered and finished. Measured (in-catalog restore, an earlier build) with a 60,000-item backup of a table with no secondary indexes: response in 0.032 s (PostgreSQL), 0.012 s (SQLite), 0.053 s (MongoDB), 0.151 s (Cassandra); ACTIVE after 1.5 s, 2.1 s, 3.6 s, and 11.2 s. Measured (store-backed restore, this release) with the same shape (60,000 items of 200 bytes, composite key, no secondary index) from a filesystem store on loopback: response in 0.051 s (PostgreSQL), 0.016 s (SQLite), 0.055 s (MongoDB); ACTIVE after 0.67 s, 1.85 s and 3.74 s (on MongoDB the job's DONE at 1.8 s and the index backfill worker's flip after); 1M items of 200 bytes in key order (the server's own backups) ACTIVE after 9.5 s on PostgreSQL and 26.8 s on SQLite, the same items as an unordered backup (a MongoDB source, a multi-part-key table) after 17.5 s and 66 to 90 s (docs/design/15-backup-restore-bench-pr9.md, which has the host and its load); the store-backed response includes the sidecar and manifest reads and its ACTIVE time the download and the per-file verification, and Cassandra as a store-backed target was measured at 12,000 items (the kill points: a resumed restore of 12,000 items of 4,000 bytes in two data files reached ACTIVE 8.3 s after its takeover on a single-node container) and at 1M items of 200 bytes in key order, ACTIVE after 49.0 s, and MongoDB's restore of its own unordered backup of 1M such items ACTIVE after 33.8 s, which another run may exceed by up to 5 s, since MongoDB's backfill worker flips the table at its next 5 s cycle after the load (docs/design/15-backup-restore-bench-pr11.md, which has the host and its load). On Cassandra the response waits for the target table's schema to be created: 0.75 to 1.3 s with five restores running at once (earlier build), which is longer than a client read timeout of 1 s. On every backend the request waits at most 60 s (RESTORE_REGISTRATION_TIMEOUT) for its background task to register the CREATING target of a store-backed restore (a bound against a connection pool that has stopped answering; the manifest and sidecar reads that precede the registration are not under it); past that it answers InternalServerError while the task goes on, so the target can appear after the error, holding the backup in use (BackupInUseException to DeleteBackup) and the name until the restore ends; DescribeTable is where a client finds it (from the code). Because that 60 s bound equals botocore's default read timeout, a client whose first attempt times out while the registration is still in flight (a backup's backup_index row held under a slow lock) retries: a retry that names the same backup and target waits for the in-flight registration and is answered its CREATING description rather than registering a second target, and a restore of a different backup into the same name while the first is in flight is TableInUseException (from the code). The wait is per server process: each server keeps its own list of in-flight registrations, so a retry waits for the first attempt's registration only when it reaches the server that holds it; a retry that reaches another server behind a load balancer finds the name free until the registration commits and then TableInUseException (the registration took the name) or, once the target exists, the same CREATING description from the catalog (from the code). The job permit is the last of the request's checks: a restore that finds every [backup] max_concurrent_jobs slot held (default 4; backups and restores together, per server process) waits up to 30 s for one and is then LimitExceededException ("Too many backup and restore jobs are running on this server (at most N at once, the [backup] max_concurrent_jobs bound); retry later"), creating nothing, where the service accepted five restores sent together (measured on DynamoDB); on the store-backed path the permit is taken before the manifest is read, after the catalog row's state, the target name and the backup's in-use rule are checked, in that order (a restore of a backup into its own CREATING target is TableInUseException, measured on DynamoDB). A restore runs inside the server process; if the process stops, see the abandoned-restore row |
RestoreSummary |
The restore response and DescribeTable while CREATING report SourceBackupArn, SourceTableArn, RestoreDateTime (the backup's BackupCreationDateTime, not the time the restore ran), and RestoreInProgress=true. Once the table is ACTIVE, DescribeTable omits RestoreSummary |
The same on all four backends. No response that describes a table (CreateTable, UpdateTable, DeleteTable, DescribeTable, RestoreTableFromBackup) carries RestoreSummary unless the table is CREATING; what the service's UpdateTable returns for a restored table was not measured |
| Reads on a restore target |
A GetItem or Scan on the target while CREATING is ResourceNotFoundException; the first read after DescribeTable reports ACTIVE succeeds (measured) |
The same on all four backends. The server's key-info cache stores a negative entry (5 s TTL by default) for a name the catalog does not have, and does not store one for a name the catalog has in a state other than ACTIVE: on a not-found answer it asks the catalog once more with DescribeTable, and authorization records the name as missing in the key-info snapshot it hands the engine, so the engine does not look it up again. A GetItem, PutItem, UpdateItem, DeleteItem, Query, or Scan on the target while it is CREATING therefore costs exactly one table_key_info and one describe_table catalog load, uncached, per request (on SQLite five SQL statements: one for the key info, four for DescribeTable; on PostgreSQL describe_table is two queries), plus one describe_table on the first such request for the throttle registry; the first read after ACTIVE loads once more and is then cached. Measured on SQLite with a GetItem loop on a CREATING restore target of 100,000 items: 40 requests refused, 40 key-info and 41 DescribeTable loads in the server's statement log; with the hand-off to the engine removed, 80 and 81. In an earlier run of the fidelity test the first GetItem after ACTIVE answered in 3 ms after 72 refused reads. |
RestoreTableFromBackup overrides |
Current request members are BillingModeOverride, ProvisionedThroughputOverride, GlobalSecondaryIndexOverride, LocalSecondaryIndexOverride, SSESpecificationOverride, OnDemandThroughputOverride, and VectorIndexOverride; DynamoDB applies them to the restored table |
See the overrides table below. A refused override is refused before the target table is created |
Members of the RestoreTableFromBackup response |
The CREATING description omits DeletionProtectionEnabled, the table's ProvisionedThroughput.NumberOfDecreasesToday, and each GSI's IndexStatus |
The same on all four backends; DescribeTable reports the first two. Each GSI's ProvisionedThroughput keeps NumberOfDecreasesToday; what the service sends there was not measured |
| Restoring into a name that exists |
TableAlreadyExistsException; into a name that is itself a CREATING restore target, TableInUseException: "Table: is already being restored from backup: " for the same backup, and "Attempt to change a resource which is still in use: Table: is being used." for a different one (both measured) |
TableAlreadyExistsException on all four backends for an existing table; TableInUseException for a name that is a CREATING restore target, whichever backup is restored, always with the same-backup text naming the backup the existing target is being restored from (the service's text for a different backup is not reproduced). The engine checks the name after the backup is read and before the overrides are checked against it, the order the service uses: a restore of a missing backup into an existing table, into a table CreateTable is still creating or into a CREATING restore target is BackupNotFoundException "Backup not found: " (measured on DynamoDB, twice each, and the same on main); an earlier build of this release checked the name first and answered TableAlreadyExistsException or TableInUseException for those three. The name is still checked before the job permit is taken, so the answer does not depend on whether a permit is free; each backend checks the name again under its registration (a missing backup reaches the backend only when it is deleted after the engine has read it), whose target insert is the fence that tells an existing table from a CREATING target, so two simultaneous requests cannot both pass. The existing table or target is unchanged |
UpdateTable on a CREATING restore target |
ResourceNotFoundException (measured on DynamoDB) |
ResourceInUseException on all four backends, the engine's mapping of a table that is not ACTIVE. A plain CreateTable into the target's name is ResourceInUseException "Table already exists: ", the service's text for a taken name (measured on DynamoDB), without the backup ARN. The target is unchanged |
BackupArn that is malformed or belongs to another account |
Not an ARN of the right shape, too long (over 1024), a control character, a slash or .. in the region: ValidationException "Invalid Request: BackupArn is not valid". The right shape with an id that is not a backup id (not hex, a wildcard): ValidationException "Invalid Backup ARN" (both measured; which input gets which text was captured for one input only: a bare 13-digit id is "Invalid Request: BackupArn is not valid"). Surrounding whitespace, a trailing newline for one, is trimmed, and an ARN naming another region of the caller's account resolves (measured). One in another partition is ValidationException (measured; text not captured) |
The same two texts on all four backends, split by ExtendDB's parser: a string that is not arn:aws:dynamodb:<region>:<account>:table/<name>/backup/<id> with a region in [a-z0-9-], a digit-only account, a name in [a-zA-Z0-9_.-], only printable ASCII, and at most 1024 bytes after trimming is "Invalid Request: BackupArn is not valid" (so is one in a partition other than aws, the only one ExtendDB issues); one of that shape whose id is neither [0-9]{14}-[0-9a-f]{8} nor a shape an earlier build issued (13 digits, -, 8 hex digits, which every backend issued before the shared id; 13 bare digits, which PostgreSQL v0.1.0 to v0.1.2 issued) is "Invalid Backup ARN"; no build has put a UUID in a backup ARN, so none resolves. Surrounding ASCII whitespace is trimmed (only a trailing newline was measured on the service; trimming all surrounding whitespace is ExtendDB's generalisation), and the region is checked for shape only: the backup is looked up under the ARN rebuilt in this deployment's server.region first and, when that is not found and the caller wrote a different ARN, under the ARN as written, so another region's resolves and a backup created under an earlier server.region stays reachable by the ARN ListBackups reports for it, though not by that ARN rewritten with the new region (see the upgrade manual on server.region). A bare 13-digit id (the shape PostgreSQL v0.1.0 to v0.1.2 issued) passes the id check, so such an ARN that names no backup is BackupNotFoundException, where the service answers ValidationException "Invalid Request: BackupArn is not valid" (measured on DynamoDB). Under a server.region outside [a-z0-9-] no backup ARN can be formed, so CreateBackup is refused with a ValidationException naming server.region, and the backups taken before the upgrade under such a region keep an ARN the three operations refuse as "not valid"; the server starts and logs a warning saying so. A well-formed ARN naming another account, of any number of digits, is refused on DescribeBackup, DeleteBackup, and RestoreTableFromBackup before any policy is evaluated, in dev mode too, with the service's answers (see "A resource ARN in another account"). The same checks apply to ListBackups's ExclusiveStartBackupArn, where another account's or region's cursor is instead a ValidationException (see ListBackups paging). In every build, dev mode included, DescribeBackup and DeleteBackup first refuse a BackupArn that does not parse as a backup ARN at all (a table ARN, an xrn: prefix, an empty field) with "Invalid Backup ARN" before any policy is evaluated, as the service does (measured on DynamoDB), so those shapes get that text instead of the engine's. Every other BackupArn is authorized as the backup it names in this deployment (the table and id, in the server's region and the caller's account, surrounding whitespace trimmed as the engine trims it) and then checked by the engine as above. Same on all four backends |
| Tag conditions on backups |
The backup resource has no aws:ResourceTag condition key: a backup has no tags to match |
DescribeBackup, DeleteBackup, and RestoreTableFromBackup are authorized on the backup ARN as a resource with no tags. An aws:ResourceTag/<key> condition finds the key absent for a backup (and dynamodb:ResourceTag/<key> is absent for every resource), so, for example, an Allow conditioned on StringEquals never grants on a backup and a Deny conditioned on StringEquals never denies one. This holds whatever an earlier build stored under the backup ARN (it accepted TagResource on one; see Tagging), and a backup does not take its table's tags. For RestoreTableFromBackup, the seven item actions evaluated on table/<TargetTableName> (see the authorization rows below) read that ARN's resource tags. A target that does not exist has no tags, so an aws:ResourceTag/<key> condition on those actions finds none and does not grant the restore; a target that exists is evaluated with its tags, and a request that is otherwise valid then passes authorization and fails TableAlreadyExistsException (or TableInUseException for a CREATING restore target) when the condition is met, and fails AccessDeniedException naming the first item action when it is not (measured on SQLite). Whether the service reads a target's tags in these evaluations was not measured. Scope backup permissions by ARN (table/<name>/backup/*). Measured on PostgreSQL and SQLite for the Allow case, including tags written under a backup ARN by the earlier build and then served by this one; the Deny case and role sessions rest on unit tests of the authorization path, which is the same for every backend |
Authorization of ListBackups |
dynamodb:ListBackups is evaluated on arn:aws:dynamodb:<region>:<account>:table/*/backup/*, or on table/<TableName>/backup/* when TableName filters the list (measured on DynamoDB) |
The same on all four backends (the check runs in the server before the backend is reached). A statement on * or table/* covers every list; one on table/<name>/backup/* (or table/<name>/*) covers only the list filtered to that table; one on the table's own ARN, table/<name>, covers none. The unfiltered list is one resource, so a Deny on table/<name>/backup/* denies the list filtered to that table and not the unfiltered list that would include its backups, which follows from the resources the service evaluates. A TableName that is not a string is evaluated as no filter; the engine then refuses the request. These resources have been evaluated since v0.1.14; the admin guide's compatibility notes describe what earlier builds evaluated |
Authorization of RestoreTableFromBackup |
dynamodb:RestoreTableFromBackup on the backup ARN, and dynamodb:Scan, dynamodb:Query, dynamodb:GetItem, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:DeleteItem, and dynamodb:BatchWriteItem on table/<TargetTableName>, each of which must be allowed; dynamodb:RestoreTableFromBackup is not evaluated on the target (measured on DynamoDB) |
The same eight evaluations on all four backends, in that order: the backup first, then the target under each item action in the order listed, stopping at the first denial, which the AccessDeniedException names (User: ... is not authorized to perform: dynamodb:Scan on resource: arn:aws:dynamodb:<region>:<account>:table/<target>); the service's order was not measured. A missing TargetTableName is evaluated as table/ (an empty name, which no statement but *-style wildcards covers); the engine then refuses the request. The seven item-action evaluations read the target ARN's resource tags: a target that does not exist has none, one that exists is evaluated with its tags and the restore then fails TableAlreadyExistsException (see Tag conditions on backups). Every DynamoDB condition key (dynamodb:LeadingKeys, dynamodb:Attributes, dynamodb:Select, dynamodb:ReturnValues, dynamodb:ReturnConsumedCapacity, dynamodb:FullTableScan, dynamodb:EnclosingOperation) is absent in these seven evaluations, so ForAllValues:* and Null: true conditions pass and bare StringEquals and Bool conditions fail: an Allow of the item actions conditioned on ForAllValues:StringEquals dynamodb:LeadingKeys grants the restore of every item in the backup, an Allow of dynamodb:Scan conditioned on Bool dynamodb:FullTableScan: false blocks every restore, and a Deny of dynamodb:Scan conditioned on Bool dynamodb:FullTableScan: true blocks none; the keys the service sets in these evaluations were not measured. The backup ARN is evaluated as the backup it names in this deployment: the table and backup id from the request, in the server's region and the caller's account, whatever partition, region or account the caller wrote, with surrounding whitespace trimmed as the engine trims it. The engine resolves the same table and id (under the server's region first, then as written for a backup created under an earlier server.region), so it never acts on a backup other than the one evaluated. DescribeBackup and DeleteBackup are evaluated the same way. These resources have been evaluated since v0.1.14 (see the admin guide's compatibility notes). A Deny of dynamodb:RestoreTableFromBackup on a table does not block restores into it; deny one of the seven item actions on it instead |
| Multi-part base table keys (preview) |
Not supported |
A store-backed backup of a table created under limits.allow_multipart_table_keys is written unordered, and its restore preserves the item set: the restored table holds what the source's Scan held, with the source's key schema and attribute definitions, the target laid out as a natively created table (bulk_load keys rows with the backend's own key functions) (measured on PostgreSQL and SQLite with the preview enabled, tests/test_backup_job.py; the engine test a_multi_part_key_manifest_is_registered). The preview's item paths address such a table by its first HASH attribute on every backend, restored or not: on PostgreSQL a GetItem by the whole key finds nothing on the source or on the restored table (a Query naming both key attributes does find the item), on SQLite the source itself keeps one item per first HASH key value and a GetItem returns that item whatever second key it was given, and a Query on the first HASH key alone is refused on both ("Query condition missed key schema element") (measured on PostgreSQL and SQLite with the preview enabled). An in-catalog backup of such a table (no store, or Cassandra) is refused at restore with ValidationException (from the code and storage-level tests) |
DeleteBackup and DeleteTable during a restore |
DeleteTable on the CREATING target is ResourceInUseException. DeleteBackup during a restore was not measured |
While the target is CREATING, DeleteTable on it is ResourceInUseException on all four backends, as on the service. DeleteBackup on its source backup is BackupInUseException on all four: that refusal is ExtendDB's contract, not measured against the service. Both succeed once the target is ACTIVE. How the restore and DeleteBackup are ordered differs (from the code). PostgreSQL and SQLite register the restore in the transaction that creates the target, holding the backup row, so a concurrent DeleteBackup is ordered strictly before (the restore then finds no backup) or after (it finds the restore). MongoDB runs the restore's registration and DeleteBackup's claim each as one session transaction that first increments a lock field on the backup's catalog document while it is AVAILABLE, so the two conflict and one orders wholly before the other: a DeleteBackup that wins leaves the registration no AVAILABLE backup (BackupNotFoundException), a registration that wins makes the DeleteBackup BackupInUseException. Cassandra uses two lightweight transactions on different partitions: the target's row is inserted first (IF NOT EXISTS, which reserves the name), then the restore is registered on the backup's row (IF backup_status = 'AVAILABLE'), which DeleteBackup claims on the same partition; a concurrent DescribeTable can therefore see a CREATING target for a restore that then fails with BackupNotFoundException, after which the target is removed. On MongoDB DeleteBackup writes the backup DELETING before it drops the data and DELETED after; a DeleteBackup whose request fails or is cancelled after the drop started leaves the backup DELETING, which DescribeBackup, ListBackups and a restore treat as gone (BackupNotFoundException), and a retry of DeleteBackup finishes the drop and answers DELETED (from the code and storage-level tests). MongoDB reads the catalog from the primary with read concern local regardless of the connection string, which the lock and the job records rely on; the connection string must use readPreference=primary (any other read preference is refused at startup). The write concern follows the connection string and must be majority (the server default): a connection string with w=1 is refused at startup, because a DELETING write or a job record acknowledged under w=1 just before a primary failover can be rolled back |
| Concurrent restores of one backup |
A second RestoreTableFromBackup of a backup while a restore from it is still CREATING is BackupInUseException (measured) |
The same on all four backends: the second restore is refused with BackupInUseException and creates nothing; the check runs inside the transaction that registers the restore (PostgreSQL, with the backup row locked FOR UPDATE; SQLite), inside the claim on the backup document followed by a check for a CREATING target of the backup (MongoDB), or inside the lightweight transaction on the backup row (Cassandra), so two simultaneous requests cannot both pass. For a store-backed restore the registration takes the same lock on the backup_index row instead of the legacy backups row (PostgreSQL SELECT ... FOR UPDATE, SQLite the BEGIN IMMEDIATE write transaction, MongoDB a $inc lock_seq on the backup_index document, Cassandra the active_restores lightweight transaction on the backup's partition), the same ordering guarantee, so a legacy restore and a store-backed restore of two different backups never contend and a DeleteBackup of a store-backed backup meets only store-backed registrations. Two concurrent registrations of one backup leave one restore target on Cassandra as on MongoDB: the registration's lightweight transaction (IF backup_status = 'AVAILABLE' AND active_restores = null) is linearized on the backup's partition, so the second finds active_restores non-null and is BackupInUseException; the in-use pre-read is advisory (storage-level tests on both). Once the first target is ACTIVE the backup restores again; on MongoDB the check reads majority-committed data (at the default transaction read concern) while DescribeTable reads at local, so a RestoreTableFromBackup or DeleteBackup issued within the majority-commit lag after DescribeTable first shows the target ACTIVE can still be BackupInUseException and succeeds when retried (the lag is the journal flush plus any concurrent batch write still holding an earlier oplog slot; measured at 7 to 12 ms, once in about 2,000 observations, with a 3,000-item insert running beside the write). A restore of a backup whose DeleteBackup is in progress answers BackupNotFoundException on every backend (the service's answer was not measured), by two mechanisms: on MongoDB and Cassandra the delete marks the backup DELETING before it drops the data, and the restore finds no AVAILABLE backup; on PostgreSQL and SQLite the restore waits for the delete's transaction and then finds no backup. Earlier builds accepted concurrent restores of one backup on PostgreSQL, SQLite, and Cassandra, and on MongoDB after a 2 s retry |
| Restore interrupted by the server stopping |
Managed by the service |
The copy runs in the server process, so a stopped process leaves its target CREATING with a RUNNING restore job record whose heartbeat stops. The engine's reconciler, once at startup and then every backup.reconcile_interval_secs (default 60 s), marks the record FAILED and removes the target once the heartbeat is older than backup.stale_job_after_secs (default 300 s) on the database's clock, on every backend alike, logs the removal with the table name, and then lets DeleteBackup and a new restore into the name succeed (from the code). On SQLite a restart ages every record of the stopped process at once (one process serves the file), so the first cycle removes it without the stale window. Until then DeleteTable and DeleteBackup are refused as during a running restore. A store-backed restore (one run from a [backup.store]) is instead resumed, not discarded: its owner's death leaves a RUNNING restore job record with a stale heartbeat and the target CREATING, and the reconciler of any instance with the configured store takes the record over under a fresh owner generation once the heartbeat is stale (on SQLite at once after a restart, by the record's slot; on PostgreSQL once the owner's claim session has ended as well), stamping a fresh heartbeat in the same write so no second instance takes it too, and resumes the load from its recorded progress (per data file on PostgreSQL, per batch on SQLite, MongoDB and Cassandra), re-downloading to its own spool when the dead owner's spool_host is not this host's; the target reaches ACTIVE with the backup's full item count, its secondary indexes complete: a resumed Cassandra restore re-applies its last batch as idempotent upserts that rewrite the same base and index rows (the write path rewrites an unchanged item's GSI and LSI rows rather than deleting them, #424). A resume that finds no recorded progress and a target holding more items than the backup's total is FAILED with reason target_not_empty and the target is left in place: the rule protects a catalog restored from a dump that names a restore which finished and was written to since. A target holding no more than the total with no recorded progress is a first data file applied in part: on Cassandra, which records a batch's progress after its writes, an ordinary crash before the first progress record (the first 10,000 items or 32 MiB) leaves written items and no progress, and the resume re-applies the first file with idempotent upserts and reaches ACTIVE with the exact count (from the code; the storage and engine cells). MongoDB records each batch's documents and its progress in one transaction, so a mid-file crash leaves no items the record does not account for and resumes to ACTIVE; only a crash before the first batch commits leaves an empty target, which resumes from the start. A record that one instance's reconciler has taken over five times without the restore ending (a resume whose final count or progress read fails every time, or that stops with the record RUNNING) is failed on the next takeover with reason owner dead: taken over 5 times by one instance without the restore ending and its target removed, so a record that can never finish does not hold its name and its backup for as long as the server runs; the count is per instance and a restart starts it over (from the code). The target stays CREATING with a FAILED record: DeleteTable on it is ResourceInUseException, DeleteBackup of its backup and a second restore of that backup are BackupInUseException, and the reconciler does not remove it; extenddb backup remove-target --account <id> <table> (the admin guide's backup section) removes the target and its record, after which DeleteBackup and a new restore into the name succeed. A legacy (in-catalog) restore is still failed and its target removed. Measured (binary-level, this release): SIGTERM during a store-backed restore left the record RUNNING and the restarted server resumed it to ACTIVE with every item (on PostgreSQL after the 45 s stale window, on SQLite at once); a SIGKILL at each restore kill point left the target to finish with the exact count (the base table's and the GSI's) or, for a failing restore, gone, except at the first reach of the Cassandra point that pauses before a batch's first progress record: on Cassandra (killed after the first batch's 10,000 upserts, before their record) the resume of that build answered target_not_empty and left the target CREATING, and extenddb backup remove-target then removed it, after which DescribeTable was ResourceNotFoundException and DeleteBackup succeeded; this release resumes that case with upserts to ACTIVE (from the code; the nightly kill-point job runs it). On MongoDB a SIGKILL after a file's insert_many leaves the batch's items and its progress committed together, so the resume continues to ACTIVE rather than target_not_empty. Not covered (from the code): on MongoDB, a target whose base copy had finished has its record DONE and is left alone by the reconciler; the index backfill worker finishes it after a restart, and if that backfill fails on every attempt the worker retries it every 5 s with a warning and never gives up, so the target stays CREATING (and DeleteTable and DeleteBackup stay refused) until the cause is fixed or the target's catalog document is removed by hand (no failing case was found to reproduce this). A target left CREATING by a build before this release is backfilled by the catalog migration as a RUNNING record with a heartbeat at the epoch, so the first cycle removes it. Heartbeats and the stale window are measured on the database server's clock, so the application hosts' clocks play no part. The same reconciler resolves a store-backed CreateBackup the server stopped (one reconciler with one duty list, in place of per-backend sweeps): a CREATING backup row whose owner is dead (on PostgreSQL and MongoDB a heartbeat older than stale_job_after_secs, on PostgreSQL once the owner's claim session has ended as well; on SQLite, where one process serves the file, every CREATING row after a restart and, at runtime, a row whose in-process slot no task holds, so a job task that died is resolved by the next cycle without a restart) is taken over under a fresh owner generation and becomes AVAILABLE when a complete, verified manifest is under its prefix in the configured store (the process died between the manifest write and the status write) and FAILED otherwise, never continuing the upload; the objects of a FAILED backup are deleted once its heartbeat is older than stale_job_after_secs; a DELETING backup's deletion is finished; a DELETED backup's prefix that still lists objects is swept; and FAILED and DELETED rows are removed once their prefix is empty and their completed_at is older than failed_row_retention_secs (7 days). Measured (binary-level, this release): SIGKILL between the data file and the manifest left the row CREATING and the data file under the prefix, and after the restart the row was FAILED in the first cycle on SQLite and 46 s after the kill on PostgreSQL (stale_job_after_secs = 45), with the prefix deleted in the same cycle on PostgreSQL (the stale heartbeat is what made the owner dead) and once the dead owner's heartbeat was stale on SQLite, 45 s after the kill (the slot made the owner dead at once; the prefix waits for the heartbeat clock on every backend); the same at a kill between the three documents and the manifest, which leaves the documents under the prefix and no manifest; SIGKILL between the manifest write and the status write left the five objects, and the row was AVAILABLE with the manifest's size and count after the restart (SQLite at once, PostgreSQL after 48 s); SIGTERM during an upload left the row FAILED with reason shutdown and an empty prefix. These duties run only while the configured store is healthy, and under a maintenance claim only the dead-owner and DELETING duties run. A FAILED backup is BackupNotFound to clients; extenddb backup list --failed prints it with its reason |
| Point-in-time recovery |
35-day window: UpdateContinuousBackups enables continuous backups, and RestoreTableToPointInTime restores to any second in the window |
Not supported; use on-demand backups (CreateBackup and RestoreTableFromBackup) instead. DescribeContinuousBackups reports ContinuousBackupsStatus: ENABLED (the service reports this unconditionally) with PointInTimeRecoveryStatus: DISABLED and no restorable-time window. UpdateContinuousBackups with PointInTimeRecoveryEnabled: true returns ContinuousBackupsUnavailableException; with false it returns the same description. RestoreTableToPointInTime returns PointInTimeRecoveryUnavailableException, the exception the service models on that operation, for every request. Both refusals carry "Point-in-time recovery is not supported by this storage backend" and come after authentication and before authorization. They read only the operation name and, for UpdateContinuousBackups, PointInTimeRecoveryEnabled, so every caller gets them, with or without permissions, and no table is read. An UpdateContinuousBackups whose PointInTimeRecoveryEnabled is not true or "true" goes to authorization and the request's checks as before. The service authorizes first: a caller with no policy is denied on dynamodb:Scan on the restore's target table, and a caller with permissions gets the request's checks and "Point in time recovery is not enabled for table ''". A table that does not exist is TableNotFoundException ("Table not found: ") on DescribeContinuousBackups and on a disable, as on the service. Same on all four backends |
| Where backups live |
Managed storage, independent of the table |
With a configured [backup.store] (a filesystem root, which is the default beside a SQLite database file, or an S3 bucket and prefix) on PostgreSQL, SQLite and MongoDB: under the store's root, at <account id>/<table name>/<backup id>/, as gzip data files of DynamoDB JSON lines (data/000001.json.gz, ...) and the manifest documents (extenddb-manifest.json last, the commit record), with a backup_index row in the catalog as the index; a lost database loses the rows, not the bytes (extenddb backup sync gives a new catalog a row for each backup under the root, and --adopt-store first makes it the owner of a root another catalog owned; a root copied to a new place keeps its backups' ARNs once --move-store re-points their rows). A prefix copied from a server of another region, whose manifest spells its ARN in that region, is adopted under this server's region: its row carries the ARN this server issues, so ListBackups names this server's region (every ListBackups answer measured on the service names the endpoint's region) and DescribeBackup, RestoreTableFromBackup and DeleteBackup find it under either region's spelling, as they find the backups this server made and as the service finds a backup under another region's spelling of its ARN (measured; DescribeBackup answers with this server's spelling, as it does for this server's own backups, where the service echoes the spelling sent); the manifest keeps the spelling it was written with, and so does the source table's ARN, which DescribeBackup's SourceTableDetails.TableArn, ListBackups' BackupSummaries[].TableArn and the restore's RestoreSummary.SourceTableArn answer in the manifest's region (a backup this server made names this server's region in every ARN it answers); the restore and the reconciler accept a manifest whose ARN differs from the row's in the region alone. extenddb backup migrate-legacy <arn> or --all copies in-catalog backups into the store under their own ARNs, refusing the ones 0.1.14 and earlier releases took (their backup ids have the 13-digit shape those releases issued, and a store prefix carries only the 14-digit shape). Without a store, and on Cassandra always, inside the database the server already uses, so a lost database loses its backups too: on PostgreSQL in the catalog database (backups, backup_items, backup_definitions, table_restores), on SQLite in the one database file, on MongoDB as a backups metadata collection in the catalog database and one data collection per backup in the data database, on Cassandra as backup metadata in the catalog keyspace and item payloads in the account's keyspace; take database-level backups for off-host copies there |
| Backup creation |
CreateBackup returns while the backup is CREATING; ListBackups and DescribeBackup expose that state until it becomes AVAILABLE. BackupName and TableName are checked as the model says: length 3 to 255 and [a-zA-Z0-9_.-]+, with "1 validation error detected: Value '' at 'backupName' failed to satisfy constraint: " texts, joined under "2 validation errors detected:" when both fail (measured). TableName may be the table's ARN (measured). A table that does not exist or is still CREATING is TableNotFoundException "Table not found: " (measured) |
With a configured [backup.store] on PostgreSQL, SQLite and MongoDB, CreateBackup takes the table's snapshot and writes the catalog row in the request and returns the backup CREATING; a job then uploads it and the backup becomes AVAILABLE, which DescribeBackup and ListBackups show as on the service (BackupSizeBytes is 0 while CREATING and the compressed size once AVAILABLE; ItemCount and TableSizeBytes in SourceTableDetails are the table's figures as last counted by the stats pass while CREATING, which is 0 and 0 for a table the stats pass has not reached yet, such as one loaded seconds before CreateBackup, and the backup's exact figures once AVAILABLE: the items written and the sum of their DynamoDB sizes; the service reported 0 and 0 in every fresh-table backup measured). CREATING lasts the whole upload (the durations below), and while it lasts DeleteBackup and RestoreTableFromBackup of the backup answer BackupInUseException "Backup is being created: " on all three backends; the 16 service backups measured were AVAILABLE 12 to 90 ms after CreateBackup answered, so a client that deletes or restores a backup right after creating it polls DescribeBackup first here. The backup is the table as it stood when its snapshot opened, which is inside the request but after the request's checks (the table's state, the store's health, the maintenance claim) and after any wait for a job permit, up to 30 s (below): every write acknowledged before the open is in the backup and none acknowledged after it, so a PutItem acknowledged while the request waited for a permit is in the backup (measured: a write acknowledged 1.01 s after a CreateBackup that waited for a permit was in it, 2 of 2 runs), and BackupCreationDateTime is the open's millisecond. Measured on the service: a restored backup contained every write acknowledged before CreateBackup was sent and the 18 writes acknowledged in the 0.1 s up to BackupCreationDateTime, and none of the 11,754 acknowledged in the 75 s that followed, so the service takes the table at an instant inside the request as well. A backup the job cannot finish (a store failure, an item no restore can load, a shutdown) is FAILED, which is BackupNotFound to clients, and its objects are deleted (the restore-interruption row). A CreateBackup still waiting in its snapshot open or row insert when the server stops writes no row; it is answered ServiceUnavailable "The server is shutting down. Retry the request." only after a registration loss, where the jobs' token is cancelled while the listener still serves, since on SIGTERM the listener's 5 s connection drain closes the connection before that token is cancelled (measured: the connection closed 8.2 s after the request was sent). Measured (this release, 16-core host, filesystem store, the record in docs/design/15-backup-restore-bench-pr8.md): 100,000 items of a composite-key table with two GSIs AVAILABLE in 1.85 s on PostgreSQL and 1.44 s on SQLite, 1,000,000 in 36.1 s and 12.45 s. Without a store, and on Cassandra always, CreateBackup copies the items before it returns and returns the backup AVAILABLE. On PostgreSQL, MongoDB, and Cassandra a concurrent ListBackups never saw an in-catalog backup CREATING (earlier build); on SQLite the backup row is visible as CREATING to other requests while the copy runs. Measured (earlier build, in-catalog): 1.3 s for 60,000 items on PostgreSQL, 1.9 s for 60,000 on SQLite, 0.2 s for 20,000 on MongoDB, 5.1 s for 20,000 on Cassandra. MongoDB's in-catalog backups report BackupSizeBytes 0. The name checks are the service's, with its texts (the length clause before the pattern clause when both fail; the service's order was not captured), counting characters, with TableName taking the deployment's table-name limits; before them a 200 KB name was stored and returned in every ListBackups page (a 500 on Cassandra) and a NUL byte was a 500 on PostgreSQL. TableName as an ARN (arn:aws:dynamodb:<region>:<account>:table/<name>) is accepted on all four backends: an ARN whose region is not the server's (server.region, compared as written, so US-EAST-1 differs from us-east-1) is ValidationException "1 validation error detected: Invalid AWS region in ''" (the service's answer, measured on DynamoDB twice; an earlier build resolved it to the server region's table), another account's is refused with the service's answers (see "A resource ARN in another account"), the account checked before the region, so another account's ARN in another region is AccessDeniedException (measured on DynamoDB for CreateBackup and ListBackups, twice each); an SDK built from the model refuses the ARN form client-side, so only a hand-built request sends it. TableNotFoundException "Table not found: " for a missing or CREATING table on all four backends, built from the request's name (the backends' own payloads differ). Without a store, and on Cassandra, a table the deployment can create is backed up whatever its name, as the service does (measured on DynamoDB: a table named ... answered ContinuousBackupsUnavailableException "Backups are being enabled for the table: .... Please retry later" 13.2 s after CreateTable and was backed up at 33.7 s): the in-catalog format writes no store prefix. With a store, a name over 255 bytes (reachable only with [limits] max_table_name_length raised) or made only of dots fits no store prefix, so the store-backed create refuses it with ValidationException before it opens a snapshot or writes a row ("TableName cannot be backed up: a backup ARN cannot be formed for it: invalid backup ARN: table name of N bytes is longer than 255" / "... invalid backup ARN: table name "..." is only dots"). Every table under a server.region outside [a-z0-9-] is refused (the BackupArn row); the checks run after the table's ACTIVE probe and before the job permit, so the refusal takes no slot. The permit is the last check: a request that finds every [backup] max_concurrent_jobs slot held (default 4) waits up to 30 s for one and is then LimitExceededException ("Too many backup and restore jobs are running on this server (at most N at once, the [backup] max_concurrent_jobs bound); retry later"), where the service accepted six CreateBackup calls sent together (measured on DynamoDB, two runs) |
DeleteBackup response |
The full DescribeBackup description with BackupStatus DELETED, including SourceTableDetails.ProvisionedThroughput (a required member) and SourceTableFeatureDetails (measured) |
The same on all four backends: the engine reads the backup's recorded definition before the delete and fills the description as DescribeBackup does, with BackupStatus DELETED. A backup whose definition this build cannot read or that does not parse is still deleted and described without feature details (logged at warn), which means a damaged PROVISIONED backup is described with on-demand ProvisionedThroughput {0, 0}: ExtendDB's choice, deletability over the throughput member of a row that is being removed, where DescribeBackup on the same row is an InternalServerError; a failure to reach the database fails the request and deletes nothing. |
Concurrent DeleteBackup of one backup |
A DeleteBackup of a backup already deleted is BackupNotFoundException; which call of several concurrent ones answers DELETED was not measured |
The same on all four backends: the one DeleteBackup that deletes the backup answers DELETED, and every other one, concurrent or later, BackupNotFoundException "Backup not found: ". For an in-catalog backup the status is read again where the deletion is decided: under the row's lock on PostgreSQL, under the write lock on SQLite, in the document's transaction on MongoDB and by the DELETING claim's lightweight transaction on Cassandra; on MongoDB and Cassandra a DeleteBackup that finds another one's DELETING (running, or stopped by a crash or a failed call) finishes that cleanup and answers BackupNotFoundException, as DescribeBackup already answers for such a backup, so a client that retries a DeleteBackup that failed after it started gets BackupNotFoundException too. A second DeleteBackup of a store-backed backup answers BackupNotFoundException on all four backends. (from the code and the tests) |
| A backup maintenance command holding the catalog's claim |
Not applicable: the service has no maintenance command |
While extenddb backup purge (or another backup maintenance command: backup sync, backup migrate-legacy or backup remove-target) holds the catalog-level maintenance claim, CreateBackup and RestoreTableFromBackup on every instance of the catalog answer HTTP 400 LimitExceededException "A backup maintenance command holds this catalog's maintenance claim; backup and restore jobs are refused until it finishes", after every other check of the request (a request refused on its own terms, a bad table name or override, gets its own error) and before the job permit. The refusal ends when the command releases the claim, or when a command that died goes stale after [backup] stale_job_after_secs. |
| A store-backed backup while the configured store is unhealthy |
Not applicable: managed storage |
CreateBackup on PostgreSQL, SQLite and MongoDB with a configured [backup.store], and DeleteBackup and RestoreTableFromBackup of a backup in that store, while the store is unhealthy or its first check is pending, answer HTTP 400 ValidationException "The filesystem backup store configured on this server is unhealthy (owned by another catalog); the operation is refused until the store's check passes", the kind (filesystem, s3) and the category in parentheses being the store's (/health reports the same category); before the first check of a store checked after the listener: "The s3 backup store configured on this server has not passed a check yet (its first check is pending); the operation is refused until it does". DescribeBackup and ListBackups still describe such a backup. Once DeleteBackup's DELETING write has committed the request answers the description with BackupStatus DELETED whatever the object deletion does; a deletion the store does not answer within its bound is left DELETING for the reconciler, logged, and the request still answers DELETED. CreateBackup's refusal comes after the table's ACTIVE probe and the name checks and before the maintenance check and the job permit, so it takes no slot and writes no row; the in-catalog create (no store, Cassandra) touches no store and is not refused. |
DescribeBackup when the definition cannot be read |
Not applicable |
A definition row that does not parse, a renamed column, or a revoked privilege (Internal from the backend) is an InternalServerError, as it is for RestoreTableFromBackup on the same read; only a definition version this build does not know is described without SourceTableFeatureDetails. |
| Consistency of a backup |
Point-in-time snapshot of the table |
PostgreSQL and SQLite take the items from one snapshot, and so does MongoDB with a configured [backup.store]. How (from the code): with a store, the request opens the table snapshot (SnapshotEngine, the module docs of crates/storage/src/snapshot.rs and the backends' snapshot_engine.rs are the record): on PostgreSQL one REPEATABLE READ transaction holds the definition and the items on the shared layout, and on the separate layout the catalog row is held shared until the data transaction is pinned, the items then paged by the data table's primary key under that transaction, each page cut at 64 MiB of item text; on SQLite one deferred read transaction opened without the engine's write lock, paged by key with the same cut; on MongoDB a session with readConcern: snapshot, so items copied late reflect the same instant as items copied early. That snapshot is the majority-committed one, which can trail DescribeTable's local read by the majority-commit lag, so a CreateBackup sent as soon as DescribeTable shows a new table ACTIVE could find it missing; the open then waits, at most 2 s, until the snapshot shows the table, and answers TableNotFoundException only for a table a local read does not show ACTIVE either. Without a store, PostgreSQL holds the table's catalog row shared from the first definition read until the data snapshot (REPEATABLE READ, pinned by a read of the table before the row is released) is taken, so the definition recorded is the one in force for the items read; the catalog and the data are separate databases, so this is a barrier, not one cross-database snapshot. SQLite reads all items in one deferred read transaction opened while the engine's write lock was held for the definition read, so writers continue during the copy; that long reader pins WAL checkpointing, so the WAL grows for the duration of the backup by the size of the backup rows written plus any concurrent writes. MongoDB without a store ($out from the live collection) and Cassandra (paging the live table) are not point-in-time: items copied early reflect the table as it was when the copy started, items copied late reflect writes made during the copy. A backup can therefore hold a write without an earlier write it followed, a state the table was never in. Measured (earlier build) with a writer that updated an early item and then a late item, pair after pair, during CreateBackup: 16 of 66 pairs on MongoDB and 123 of 800 on Cassandra had the late write without the early one; 0 on PostgreSQL (of 228) and SQLite (of 230). Back up a Cassandra table, or a MongoDB table on a server without a store, while it is not being written if the backup must be consistent |
CreateBackup of a table holding an N value the wire did not validate |
Every stored value is a valid number, and a backup holds the table as it is |
With a configured [backup.store] the backup fails. Four write paths of earlier builds stored an N value such as 1E126 or abc without validating it (#618: BatchWriteItem, TransactWriteItems, UpdateItem on an absent item in the key it creates, ImportTable), and UpdateItem and a TransactWriteItems Update of builds before #433 stored an attribute name over 65,535 bytes without checking it, and the store-backed job validates every item before encoding it with the rule the restore applies (validate_restorable_item: every N and NS member a valid number, the nesting depth, the key shape (each key attribute present, of its declared type, not empty, an N key normalized), the item size against the instance's max_item_size_bytes, the hash and range key sizes and the attribute name sizes against the instance's limits, and for an item over the default item limit the data file line against the format's 32 MiB cap), so no backup that no restore can load is reported AVAILABLE. After the first refusal the job reads and validates the rest of the snapshot, logs each refused item with its key, attribute path and reason beside the backup ARN (up to 1,000, then a count), and fails the backup with a reason giving the count and the first item, naming #618 only when that item's refusal is an N value ("3 item(s) cannot be restored; first: key {...}, attribute amount: Number overflow... (#618)"); an item over max_item_size_bytes (stored under a higher limit) fails it the same way with a reason naming the size and the limit and not #618. The client sees CREATING and then BackupNotFound; the reason reaches the operator (extenddb backup list --failed, and the log, which a tenant's support case can cite; every tenant-supplied text in the line is written as a JSON string's content, control characters and the Unicode line separators U+0085, U+2028 and U+2029 escaped, so a newline or a line separator in an attribute name or a number value cannot forge a second log record); the way out is to rewrite or delete each named item through the wire (an item whose key itself holds such a number cannot be rewritten or deleted through the wire, since a PutItem or a DeleteItem with that key is refused; #982 tracks a way to remove it). The in-catalog create (no store, Cassandra) backs such a table up and restores it as before (wire tests on PostgreSQL and SQLite for each path) |
Restoring into MongoDB an N key value past Decimal128 |
Not applicable |
A store-backed restore into the MongoDB backend of a backup holding an N sort-key value of more than 34 significant digits (the sort-key column is BSON Decimal128) fails: the restore job applies the file through the write path, whose ValidationException ("Numeric sort key value '' exceeds supported precision (Decimal128, 34 significant digits)") becomes the restore's FAILED reason, so the client sees the target CREATING and then gone and the server log carries the text. PostgreSQL, SQLite and Cassandra restore the same value (their sort-key columns are numeric or decimal). A non-key N of up to 38 digits is stored as the item's text and restores intact on every backend, MongoDB included (wire tests against the MongoDB runner) |
ListBackups paging |
At most 100 summaries per page, with LastEvaluatedBackupArn; Limit 1 to 100. TimeRangeLowerBound, TimeRangeUpperBound, and BackupType filter the list. TableName is checked as the model says (3 to 255, [a-zA-Z0-9_.-]+, the "N validation error(s) detected" texts). An ExclusiveStartBackupArn of another account is ValidationException "Invalid Request: The supplied ExclusiveStartBackupArn does not match the account"; of another region, or of a table other than TableName's, ValidationException ("does not match the region", "does not match the table name predicate"); a time bound before the epoch is ValidationException; a lower bound above the upper bound is ValidationException "Time range lower bound must be less than or equal to upper bound" (all measured) |
The same paging on all four backends: Limit outside 1 to 100 is ValidationException, ExclusiveStartBackupArn resumes after the given backup, and summaries are ordered by creation time then ARN. Summaries carry TableId. TimeRangeLowerBound (inclusive) and TimeRangeUpperBound (exclusive) keep backups created in that range, and BackupType keeps backups of that type (USER when absent, every type for ALL); every ExtendDB backup is USER, so SYSTEM and AWS_BACKUP list nothing. The filters apply before paging, so Limit and the cursor count only backups that pass. Measured on SQLite and PostgreSQL with whole-second bounds between two backups taken 2 s apart; the millisecond edges are from the engine's unit tests. The request checks above are the service's, with its texts where captured: the account text in full; the region and table-name texts complete the captured fragments on the account text's pattern ("Invalid Request: The supplied ExclusiveStartBackupArn does not match the region" / "... the table name predicate"), checked in that order after the ARN's shape; a bound before the epoch is refused with ExtendDB's own text naming the member; equal bounds list nothing. An ExclusiveStartBackupArn that is not in the listing (excluded by the filters, or deleted since the previous page) is placed by the creation time in its id; one whose id carries no time (the 13-digit ids of earlier builds, with or without the hex suffix: only the 14-digit form carries one) is then a ValidationException. A cursor in another region is accepted only when it is the stored ARN of a backup of the account (or of TableName), which is what LastEvaluatedBackupArn hands out for a backup created under an earlier server.region, so paging passes such a backup; any other cursor in another region is refused ("does not match the region"). If that backup is deleted between two pages, its ARN is no longer a stored one and the next page is refused the same way (a same-region cursor would be placed by its time instead); start the listing again. Under a server.region outside [a-z0-9-] the cursor is still the stored ARN: a listing of backups created under a valid region pages, and a cursor that is the ARN of a backup an earlier release created under the invalid region is refused with "Invalid Request: BackupArn is not valid". TableName is a table name or a table ARN, as CreateBackup accepts it (the service accepts both, measured on DynamoDB): the ARN form lists what the name lists, an ARN whose region is not the server's (compared as written) is ValidationException "1 validation error detected: Invalid AWS region in ''" (the service's answer, measured on DynamoDB twice), another account's ARN is AccessDeniedException, and the cursor's table check runs against the resolved name. A numeric TableName is refused with the text the service uses for a map ("Start of structure or map found where not expected"), not measured for a number. Every ListBackups request reads all of the account's backups (or all of the table's, with TableName) from storage and pages them in memory, so walking N backups 100 at a time reads about N²/100 rows in total (from the code) |
| Backup ARN and creation time |
Backup id is 14-digit zero-padded epoch milliseconds, -, 8 hex digits; BackupCreationDateTime has sub-second precision |
The same shape on all four backends; BackupCreationDateTime is the millisecond in the ARN |
| Running two servers against one MongoDB catalog |
Not applicable |
MongoDB uses the fixed database names extenddb_catalog and extenddb_data whatever --catalog-db and --data-db say, and takes no serve lock: two servers on one replica set share one catalog and both start. Each server's reconciler acts only on a restore whose job record's heartbeat is older than backup.stale_job_after_secs (default 300 s) on the database's clock, so one server does not remove another live server's restore; every heartbeat a restore writes, the registration's first one included, is stamped with the database's $$NOW inside the registration's transaction, so a host whose clock is behind the database's plays no part in that judgement (from the code and storage-level tests). Running more than one server per catalog is otherwise unsupported (see the deployment guide) |