Added help and documentation for fdbbackup modify. Add BackupUID and more parseable BackupURL to fdbbackup status output.

This commit is contained in:
Stephen Atherton 2019-03-05 05:13:48 -08:00
parent d3377722d5
commit f6559bbb11
3 changed files with 32 additions and 3 deletions

View File

@ -39,7 +39,7 @@ Tools
There are 5 command line tools for working with Backup and DR operations:
``fdbbackup``
This command line tool is used to control (but not execute) backup jobs and manage backup data. It can ``start`` or ``abort`` a backup, ``discontinue`` a continuous backup, get the ``status`` of an ongoing backup, or ``wait`` for a backup to complete. It can also ``describe``, ``delete``, ``expire`` data in a backup, or ``list`` the backups at a destination folder URL.
This command line tool is used to control (but not execute) backup jobs and manage backup data. It can ``start``, ``modify`` or ``abort`` a backup, ``discontinue`` a continuous backup, get the ``status`` of an ongoing backup, or ``wait`` for a backup to complete. It can also ``describe``, ``delete``, ``expire`` data in a backup, or ``list`` the backups at a destination folder URL.
``fdbrestore``
This command line tool is used to control (but not execute) restore jobs. It can ``start`` or ``abort`` a restore, get the ``status`` of current and recent restore tasks, or ``wait`` for a restore task to complete while printing ongoing progress details.
@ -235,6 +235,29 @@ The ``start`` subcommand is used to start a backup. If there is already a backu
user@host$ fdbbackup start -k 'apple bananna' -k 'mango pineapple' -d <BACKUP_URL>
user@host$ fdbbackup start -k '@pp1e b*n*nn*' -k '#an&0 p^n3app!e' -d <BACKUP_URL>
.. program:: fdbbackup modify
``modify``
---------
The ``modify`` subcommand is used to modify parameters of a running backup. All specified changes are made in a single transaction.
::
user@host$ fdbbackup modify [-t <TAG>] [-d <BACKUP_URL>] [-s <DURATION>] [-as <DURATION>] [--verify_uid <UID>]
``-d <BACKUP_URL>``
Sets a new Backup URL for the backup to write to. This is most likely to be used to change only URL parameters or account information. However, it can also be used to start writing to a new destination mid-backup. The new old location will cease gaining any additional restorability, while the new location will not be restorable until a new snapshot begins and completes. Full restorability would be regained, however, if the contents of the two destinations were to be combined by the user.
``-s <DURATION>`` or ``--snapshot_interval <DURATION>``
Sets a new duration for backup snapshots, in seconds.
``-as <DURATION>`` or ``--active_snapshot_interval <DURATION>``
Sets new duration for the backup's currently active snapshot, in seconds, relative to the start of the snapshot.
``--verify_uid <UID>``
Specifies a UID to verify against the BackupUID of the running backup. If provided, the UID is verified in the same transaction which sets the new backup parameters.
.. program:: fdbbackup abort
``abort``

View File

@ -802,7 +802,7 @@ static void printBackupUsage(bool devhelp) {
" FDB_CLUSTER_FILE environment variable, then `./fdb.cluster',\n"
" then `%s'.\n", platform::getDefaultClusterFilePath().c_str());
printf(" -d, --destcontainer URL\n"
" The Backup container URL for start, describe, expire, and delete operations.\n");
" The Backup container URL for start, modify, describe, expire, and delete operations.\n");
printBackupContainerInfo();
printf(" -b, --base_url BASEURL\n"
" Base backup URL for list operations. This looks like a Backup URL but without a backup name.\n");
@ -827,7 +827,11 @@ static void printBackupUsage(bool devhelp) {
printf(" For describe operations, lookup versions in the database to obtain timestamps. A cluster file is required.\n");
printf(" -f, --force For expire operations, force expiration even if minimum restorability would be violated.\n");
printf(" -s, --snapshot_interval DURATION\n"
" For start operations, specifies the backup's target snapshot interval as DURATION seconds. Defaults to %d.\n", CLIENT_KNOBS->BACKUP_DEFAULT_SNAPSHOT_INTERVAL_SEC);
" For start or modify operations, specifies the backup's default target snapshot interval as DURATION seconds. Defaults to %d for start operations.\n", CLIENT_KNOBS->BACKUP_DEFAULT_SNAPSHOT_INTERVAL_SEC);
printf(" -as, --active_snapshot_interval DURATION\n"
" For modify operations, sets the desired interval for the backup's currently active snapshot, relative to the start of the snapshot.\n");
printf(" --verify_uid UID\n"
" Specifies a UID to verify against the BackupUID of the running backup. If provided, the UID is verified in the same transaction which sets the new backup parameters.\n");
printf(" -e ERRORLIMIT The maximum number of errors printed by status (default is 10).\n");
printf(" -k KEYS List of key ranges to backup.\n"
" If not specified, the entire database will be backed up.\n");

View File

@ -3803,6 +3803,8 @@ public:
statusText += "The previous backup on tag `" + tagName + "' at " + bc->getURL() + " " + backupStatus + ".\n";
break;
}
statusText += format("BackupUID: %s\n", uidAndAbortedFlag.get().first.toString().c_str());
statusText += format("BackupURL: %s\n", bc->getURL().c_str());
if(snapshotProgress) {
state int64_t snapshotInterval;