Commit Graph

26 Commits

Author SHA1 Message Date
Trevor Clinkenbeard 484293f8d3 Fix backup key-file size limit clang-tidy warning 2026-07-22 10:56:29 -07:00
Trevor Clinkenbeard 77d1d415fc Deduplicate common backup command-line option groups 2026-07-22 09:59:27 -07:00
Johannes Scheuermann 4c775a91e8
Add note to fdbbackup expire if expire version got adjusted. (#13664)
expireData() can silently roll the expiration point back to a log file begin version when the requested version falls in the middle of that log file, since a log file cannot be partially deleted.
The CLI always printed the originally requested version regardless, making it look like more data was deleted than actually was.
ExpireProgress now tracks both the requested and actual end version so the CLI can print a note when they differ, in either direction (rolled back, or already expired past the request).
2026-07-10 09:52:46 +02:00
Trevor Clinkenbeard fe42e6fd79 Enforce clang-tidy braces around long statements 2026-06-22 23:01:11 -07:00
Michael Stack 9b5dda16ce
backup/restore: operator UX cleanups for CLI flags and status output (#13345)
Four small, independent changes surfaced while running a manual
backup/restore demo end to end:

- fdbrestore now accepts -C and --cluster-file as aliases for
  --dest-cluster-file. Every other tool (fdbcli, fdbbackup, fdbserver,
  backup_agent) already pairs -C with --cluster-file; fdbrestore was
  the lone outlier and forced scripts to special-case it.

- fdbcli now accepts --logdir as an alias for --log-dir. Every other
  tool spells the flag --logdir (no hyphen); the --log-dir form in
  fdbcli was the outlier here.

- fdbbackup status no longer prints "BulkLoad Compatible: no" when
  Snapshot Mode is rangefile. In that mode the answer is tautologically
  derivable from the line above it (no bulkdump task ever runs), so
  the line carries no information. The field still prints in modes
  bulkdump and both, where it can flip during an in-progress backup.

- Correct the misleading comment in FileBackupAgent.cpp that claimed
  submitBulkLoadJob validates cluster preconditions server-side. It
  does not. A bulkload restore against a cluster missing
  shard_encode_location_metadata / enable_read_lock_on_range, or with
  a storage engine that cannot ingest SSTs, succeeds at submission and
  then silently stalls in "State: running, Tasks: 0/0" forever. Replace
  the comment with a faithful description of the failure mode and add
  a matching TODO in submitBulkLoadJob explaining where the real
  validation needs to live (somewhere with cluster-side knob
  visibility) and why it cannot be done from fdbclient.
2026-06-12 07:54:47 -07:00
LRS 018e4c00d9
Allow fdbbackup query original cluster file (#13309) 2026-06-05 08:24:15 -07:00
LRS 8afab9cab7
fdbbackup: add initial-snapshot-interval to help (#13299) 2026-06-01 21:12:10 -04:00
Trevor Clinkenbeard 287efc8530 Rename key-backed coroutine headers 2026-05-11 07:47:09 -07:00
Akanksha Mahajan 9ec2b21a80
Encryption backward compatibility changes and formatting (#13129)
* Encryption changes

* Addressed comments
2026-05-05 21:33:52 -07:00
neethuhaneesha 1de02c28c5
Adding mutation log type configuration to backup. (#13123) 2026-05-04 13:32:11 -07:00
Akanksha Mahajan 54795dcc94
Design changes to pass encryption_block_size to fdbbackup command and remove knob (#13023) 2026-04-30 13:32:14 -07:00
Akanksha Mahajan 6f4e0ebb8b
Remove EncryptionKey from Expire Backup (#13009) 2026-04-17 11:17:27 -07:00
Arnav Aggarwal ea921e6420
Introduce blob store interface and refactor S3 classes (#12936)
* Refactor blob store classes to use interface

* update to make some methods non-pure virtual

* Complete IBlobStoreEndpoint interface refactoring

Move doRequest, connect, returnConnection, updateSecret, writeEntireFile,
listObjects, and deleteRecursively from S3BlobStoreEndpoint to the shared
IBlobStoreEndpoint base class. Introduce provider hook methods
(setRequestHeaders, normalizeResourceForRequest, simulateRequestFailure,
processRequestFailure, preRetryCheck, extractCredentialFields) so that
the request loop is provider-agnostic.

Rename s3_backup_test.sh to backup_restore_test.sh and update CMake
to reflect the provider-agnostic naming.

Fix double proxy absolute-form rewrite bug where both
S3BlobStoreEndpoint::normalizeResourceForRequest and the base doRequest
would prepend http://host:port for proxy connections.

Fix getResourceURL duplication by having S3's override delegate to the
base class for shared knob-params/extra-headers logic.

* resolve review comments

* remove gcs auto region block

* clang format

* Enable +x bit.

* clang tidy
2026-04-17 09:17:15 -07:00
Trevor Clinkenbeard 9a39ca2728 Migrate client-side callers 2026-04-02 10:23:26 +00:00
gxglass bca167fe96
Remove parallel restore feature (#12903)
This parallel restore feature has been slated for removal for at least a year. This PR is closely based on earlier PR #12107.

This blog post explains some of the problems with the parallel restore feature: https://medium.com/@jingyuzhou/why-foundationdb-restore-is-slow-and-what-can-be-done-about-it-e73a821fdd33

As far as large feature removal changes go, this one is very straightforward, with most relevant files and test cases simply being deleted. There is one knob rename where storageserver.actor.cpp was using a knob with FASTRESTORE in the name. Other than that, changes to shared files mainly involve removing fastrestore-specific CLI and role support.

In progress:
20260330-222511-gglass-5ee0142213471b70 compressed=True data_size=35343375 duration=4611964 ended=100000 fail=1 fail_fast=1000 max_runs=100000 pass=99999 priority=100 remaining=0 runtime=0:58:23 sanity=False started=100000 stopped=20260330-232334 submitted=20260330-222511 timeout=5400 username=gglass

The one failure was in SwizzledCycleTest.toml with too many lines of output and a timeout. I kind of suspect it's unrelated but haven't looked further.
* Remove parallel restore feature.  This is based on earlier PR 12107.  Compiles but untested.

* AI generated commit:

⏺ The fix restores a single if block that was accidentally deleted when removing the FASTRESTORE_TOOL code:

  if (!restoreSystemKeys && !restoreUserKeys && backupKeys.empty()) {
      addDefaultBackupRanges(backupKeys);
  }

  When no explicit key ranges are specified on the command line and neither --user-data nor --system-metadata flags are set, this populates backupKeys with the default backup ranges
  (essentially all user data). Without it, backupKeys stays empty and hits the ASSERT(!backupRanges.empty()) in submitBackup().

* Remove a believed-to-be-dead code path, and update .gitignore

* Remove duplicate definition of restoreRequestDoneKey
2026-04-01 15:57:12 -07:00
Aditya kumar singh 07b583f1d1
Fix: show all DR tags in status when multiple DRs pull from the same … (#12868)
* Fix: show all DR tags in status when multiple DRs pull from the same primary (#8316)
2026-04-01 13:12:56 -07:00
Trevor Clinkenbeard 6b5e6c9e40 Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/actor-header-rename 2026-03-29 12:41:02 -07:00
Trevor Clinkenbeard 9a117855fc Post coroutine conversion linting 2026-03-27 02:22:12 -07:00
Trevor Clinkenbeard 9ba44fd75b Rename *.actor.h files without ACTORs 2026-03-27 04:53:43 +00:00
Trevor Clinkenbeard e3a13db3a8 Remove unnecessary initialization 2026-03-25 22:31:54 -07:00
Trevor Clinkenbeard e66742ce3f Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/backup-coro 2026-03-25 19:18:05 -07:00
Trevor Clinkenbeard cd5de83b6d Fix invalid err access 2026-03-25 04:43:36 +00:00
Trevor Clinkenbeard 942040e436 Remove variable shadowing 2026-03-25 04:40:51 +00:00
Trevor Clinkenbeard 00dc3adc5f Update getLayerStatus to return AsyncResult 2026-03-25 04:35:53 +00:00
Trevor Clinkenbeard 2a46ba6431 Remove race usage from backup.cpp 2026-03-25 04:28:55 +00:00
Trevor Clinkenbeard d0d23e86fe Rename backup.actor.cpp 2026-03-25 04:22:18 +00:00