From 131cbaa0cf74a7b3ca24ec971a9495c8dbd73e6a Mon Sep 17 00:00:00 2001 From: Jeff Blaine Date: Wed, 8 Jun 2011 20:56:46 -0400 Subject: [PATCH] Change -n to -dryrun for backup subcommands Change -n to -dryrun for "don't do it, show it though" operation to be in line with agreement on -dryrun in place of -noexecute or -n. Updated man page POD sources to reflect the changes and updated README to remove these specific todo line items. Change-Id: I5c1361dcc866ea3d1efbb0c0ddcd4a7fe513c816 Reviewed-on: http://gerrit.openafs.org/4827 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- doc/man-pages/README | 6 +--- doc/man-pages/pod8/backup_diskrestore.pod | 14 ++++----- doc/man-pages/pod8/backup_volrestore.pod | 12 +++---- doc/man-pages/pod8/backup_volsetrestore.pod | 35 +++++++++++---------- src/bucoord/main.c | 17 +++++++--- 5 files changed, 45 insertions(+), 39 deletions(-) diff --git a/doc/man-pages/README b/doc/man-pages/README index 19a777ab0..8394f9711 100644 --- a/doc/man-pages/README +++ b/doc/man-pages/README @@ -277,13 +277,9 @@ Known Problems * Document backup deletedump -port/-groupid/-dbonly/-force/-noexecute - * Replace backup diskrestore/dump -n option with -noexecute or -dryrun? - * Document backup help -admin - * Document backup volrestore -usedump. Also, s/-n/.../ as above? - - * Replace backup volsetrestore -n option with -noexecute or -dryrun? + * Document backup volrestore -usedump. If you notice other problems, please send them to the openafs-doc list even if you don't have time to fix them. Someone else might, and we diff --git a/doc/man-pages/pod8/backup_diskrestore.pod b/doc/man-pages/pod8/backup_diskrestore.pod index e20f68270..04fa01669 100644 --- a/doc/man-pages/pod8/backup_diskrestore.pod +++ b/doc/man-pages/pod8/backup_diskrestore.pod @@ -13,14 +13,14 @@ B S<<< B<-server> > >>> S<<< [B<-newserver> >] >>> S<<< [B<-newpartition> >] >>> S<<< [B<-extension> >] >>> - [B<-n>] [B<-localauth>] S<<< [B<-cell> >] >>> [B<-help>] + [B<-dryrun>] [B<-localauth>] S<<< [B<-cell> >] >>> [B<-help>] B S<<< B<-s> > >>> S<<< B<-pa> > >>> S<<< [B<-po> >+] >>> S<<< [B<-news> >] >>> S<<< [B<-newp> >] >>> - S<<< [B<-e> >] >>> [B<-n>] [B<-l>] + S<<< [B<-e> >] >>> [B<-dryrun>] [B<-l>] S<<< [B<-c> >] >>> [B<-h>] =for html @@ -106,8 +106,8 @@ volume with the specified extension also already exists, the command overwrites it. To print out a list of the tapes containing the needed dumps, without -actually performing the restore operation, include the B<-n> flag along -with the other options to be used on the actual command. +actually performing the restore operation, include the B<-dryrun> flag +along with the other options to be used on the actual command. The Tape Coordinator's default response to this command is to access the first tape it needs by invoking the C instruction in the local @@ -179,7 +179,7 @@ name and extension cannot exceed 22 characters in length. To use a period to separate the extension from the name, specify it as the first character of the string (as in C<.rst>, for example). -=item B<-n> +=item B<-dryrun> Displays a list of the tapes necessary to perform the requested restore, without actually performing the operation. @@ -218,7 +218,7 @@ without restoring the indicated volume or the value C to terminate the operation. In the latter case, the operator can then attempt to determine the cause of the tape error. -If the issuer includes the B<-n> flag with the command, the following +If the issuer includes the B<-dryrun> flag with the command, the following string appears at the head of the list of the tapes necessary to perform the restore operation: @@ -246,7 +246,7 @@ The following command lists the tapes required to restore the volumes for which the VLDB lists a read/write site on the F partition of the machine C: - % backup diskrestore -server fs4.abc.com -partition /vicepm -n + % backup diskrestore -server fs4.abc.com -partition /vicepm -dryrun Tapes needed: user.sunday1.1 user.sunday1.2 diff --git a/doc/man-pages/pod8/backup_volrestore.pod b/doc/man-pages/pod8/backup_volrestore.pod index 19e88b633..d1eb91020 100644 --- a/doc/man-pages/pod8/backup_volrestore.pod +++ b/doc/man-pages/pod8/backup_volrestore.pod @@ -12,7 +12,7 @@ B S<<< B<-server> > >>> S<<< B<-volume> >+ >>> S<<< [B<-extension> >] >>> S<<< [B<-date> >+] >>> - S<<< [B<-portoffset> >+] >>> [B<-n>] + S<<< [B<-portoffset> >+] >>> [B<-dryrun>] S<<< [B<-usedump> >] >>> [B<-localauth>] S<<< [B<-cell> >] >>> [B<-help>] @@ -23,7 +23,7 @@ B S<<< B<-s> > >>> S<<< [B<-d> >+] >>> S<<< [B<-po> >+] >>> S<<< [B<-u> >] >>> - [B<-n>] [B<-l>] S<<< [B<-c> >] >>> [B<-h>] + [B<-dryrun>] [B<-l>] S<<< [B<-c> >] >>> [B<-h>] =for html @@ -127,8 +127,8 @@ volume name explicitly includes the C<.backup> or C<.readonly> extension, the Backup System restores dumps of the corresponding volume version only. To generate a list of the tapes the Backup System needs to perform the -restore operation, without actually performing it, combine the B<-n> flag -with the options to be used on the actual command. +restore operation, without actually performing it, combine the B<-dryrun> +flag with the options to be used on the actual command. If all of the full and incremental dumps of all relevant volumes were not written to a type of tape that a single Tape Coordinator can read, use the @@ -230,7 +230,7 @@ Provide this argument unless the default value of 0 (zero) is appropriate for all dumps. If C<0> is just one of the values in the list, provide it explicitly in the appropriate order. -=item B<-n> +=item B<-dryrun> Displays the list of tapes that contain the dumps required by the restore operation, without actually performing the operation. @@ -257,7 +257,7 @@ ignored. =head1 OUTPUT -If the issuer includes the B<-n> flag with the command, the following +If the issuer includes the B<-dryrun> flag with the command, the following string appears at the head of the list of the tapes necessary to complete the restore operation. diff --git a/doc/man-pages/pod8/backup_volsetrestore.pod b/doc/man-pages/pod8/backup_volsetrestore.pod index 77711376d..4001038ca 100644 --- a/doc/man-pages/pod8/backup_volsetrestore.pod +++ b/doc/man-pages/pod8/backup_volsetrestore.pod @@ -10,14 +10,14 @@ backup_volsetrestore - Restores all volumes in a volume set B S<<< [B<-name> >] >>> S<<< [B<-file> >] >>> S<<< [B<-portoffset> >+] >>> - S<<< [B<-extension> >] >>> [B<-n>] + S<<< [B<-extension> >] >>> [B<-dryrun>] [B<-localauth>] S<<< [B<-cell> >] >>> [B<-help>] B S<<< [B<-na> >] >>> S<<< [B<-f> >] >>> S<<< [B<-p> >+] >>> S<<< [B<-e> >] >>> - [B<-n>] [B<-l>] S<<< [B<-c> >] >>> [B<-h>] + [B<-dryrun>] [B<-l>] S<<< [B<-c> >] >>> [B<-h>] =for html @@ -112,10 +112,11 @@ the read/write base name, and creates a new VLDB entry. The command does not affect the existing volume in any way. However, if a volume with the specified extension also already exists, the command overwrites it. -The B<-n> flag produces a list of the volumes to be restored if the B<-n> -flag were not included, without actually restoring any volumes. See -L for a detailed description of the output, and suggestions on how -to combine it most effectively with the B<-file> and B<-name> arguments. +The B<-dryrun> flag produces a list of the volumes to be restored if the +B<-dryrun> flag were not included, without actually restoring any volumes. +See L for a detailed description of the output, and suggestions +on how to combine it most effectively with the B<-file> and B<-name> +arguments. The execution time for a B command depends on the number of volumes to be restored and the amount of data in them, but it @@ -224,7 +225,7 @@ Provide this argument unless the default value of 0 (zero) is appropriate for all dumps. If C<0> is just one of the values in the list, provide it explicitly in the appropriate order. -=item B<-n> +=item B<-dryrun> Displays a list of the volumes to be restored if the flag were not included, without actually restoring them. L details the format of @@ -254,8 +255,8 @@ ignored. =head1 OUTPUT -If the B<-n> flag is not provided, the command displays a unique task ID -number for the operation, in two places: +If the B<-dryrun> flag is not provided, the command displays a unique +task ID number for the operation, in two places: =over 4 @@ -275,13 +276,13 @@ B command when the B command is issued in interactive mode. The Backup System does not assign either type of ID number until the restoration process actually begins. -When the B<-n> flag is included, no task ID or job ID numbers are reported -because none are assigned. Instead, the output begins with a count of the -number of volumes to be restored, followed by a line for each dump of a -volume. For each volume, the line representing the most recent full dump -appears first, and lines for any subsequent incremental dumps follow, -ordered by dump level. The lines for a given volume do not necessarily -appear all together, however. +When the B<-dryrun> flag is included, no task ID or job ID numbers are +reported because none are assigned. Instead, the output begins with a +count of the number of volumes to be restored, followed by a line for +each dump of a volume. For each volume, the line representing the most +recent full dump appears first, and lines for any subsequent incremental +dumps follow, ordered by dump level. The lines for a given volume do not +necessarily appear all together, however. The format of each line is as follows (the output is shown here on two lines only for legibility reasons): @@ -340,7 +341,7 @@ The date and time when the volume was dumped. =back One way to generate a file for use as input to the B<-file> argument is to -combine the B<-name> and B<-n> options, directing the output to a +combine the B<-name> and B<-dryrun> options, directing the output to a file. The I section on using the Backup System to restore data explains how to edit the file as necessary before using it as input to the B<-file> argument. diff --git a/src/bucoord/main.c b/src/bucoord/main.c index 206518b18..c8bb725fe 100644 --- a/src/bucoord/main.c +++ b/src/bucoord/main.c @@ -476,7 +476,9 @@ main(int argc, char **argv) cmd_AddParm(ts, "-at", CMD_LIST, CMD_OPTIONAL, "Date/time to start dump"); cmd_AddParm(ts, "-append", CMD_FLAG, CMD_OPTIONAL, "append to existing dump set"); - cmd_AddParm(ts, "-n", CMD_FLAG, CMD_OPTIONAL, "don't really execute it"); + cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, + "list what would be done, don't do it"); + cmd_AddParmAlias(ts, 5, "-n"); cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "load file"); if (!interact) add_std_args(ts); @@ -494,7 +496,9 @@ main(int argc, char **argv) cmd_AddParm(ts, "-date", CMD_LIST, CMD_OPTIONAL, "date from which to restore"); cmd_AddParm(ts, "-portoffset", CMD_LIST, CMD_OPTIONAL, "TC port offsets"); - cmd_AddParm(ts, "-n", CMD_FLAG, CMD_OPTIONAL, "don't really execute it"); + cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, + "list what would be done, don't do it"); + cmd_AddParmAlias(ts, 6, "-n"); cmd_AddParm(ts, "-usedump", CMD_SINGLE, CMD_OPTIONAL, "specify the dumpID to restore from"); if (!interact) @@ -514,7 +518,9 @@ main(int argc, char **argv) "destination partition"); cmd_AddParm(ts, "-extension", CMD_SINGLE, CMD_OPTIONAL, "new volume name extension"); - cmd_AddParm(ts, "-n", CMD_FLAG, CMD_OPTIONAL, "don't really execute it"); + cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, + "list what would be done, don't do it"); + cmd_AddParmAlias(ts, 11, "-n"); if (!interact) add_std_args(ts); @@ -527,7 +533,9 @@ main(int argc, char **argv) cmd_AddParm(ts, "-portoffset", CMD_LIST, CMD_OPTIONAL, "TC port offset"); cmd_AddParm(ts, "-extension", CMD_SINGLE, CMD_OPTIONAL, "new volume name extension"); - cmd_AddParm(ts, "-n", CMD_FLAG, CMD_OPTIONAL, "don't really execute it"); + cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, + "list what would be done, don't do it"); + cmd_AddParmAlias(ts, 4, "-n"); if (!interact) add_std_args(ts); @@ -704,6 +712,7 @@ main(int argc, char **argv) cmd_AddParm(ts, "-noexecute", CMD_FLAG, CMD_OPTIONAL|CMD_HIDDEN, ""); cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "list the dumps, don't delete anything"); + cmd_AddParmAlias(ts, 8, "-n"); if (!interact) add_std_args(ts); -- 2.39.5