diff --git a/README.rst b/README.rst index 55b9f31d..26072788 100644 --- a/README.rst +++ b/README.rst @@ -798,7 +798,7 @@ Available options:: [--cinder-vol-id CINDER_VOL_ID] [--nova-inst-id NOVA_INST_ID] [--cindernative-vol-id CINDERNATIVE_VOL_ID] [--download-limit DOWNLOAD_LIMIT] - [--sql-server-conf SQL_SERVER_CONF] [--vssadmin] + [--sql-server-conf SQL_SERVER_CONF] [--command COMMAND] [--compression {gzip,bzip2,xz}] [--storage {local,swift,ssh}] [--ssh-key SSH_KEY] [--ssh-username SSH_USERNAME] [--ssh-host SSH_HOST] @@ -966,8 +966,6 @@ Available options:: Set the SQL Server configuration file where freezer retrieve the sql server instance. Following is an example of config file: instance = - --vssadmin Create a backup using a snapshot on windows using - vssadmin. Options are: True and False, default is True --command COMMAND Command executed by exec action --compression {gzip,bzip2,xz} compression algorithm to use. gzip is default diff --git a/freezer/arguments.py b/freezer/arguments.py index 59f02bdd..df7b6b43 100644 --- a/freezer/arguments.py +++ b/freezer/arguments.py @@ -62,8 +62,7 @@ DEFAULT_PARAMS = { 'upload_limit': None, 'always_level': False, 'version': False, 'dry_run': False, 'lvm_snapsize': DEFAULT_LVM_SNAPSIZE, 'restore_abs_path': False, 'log_file': None, 'log_level': "info", - 'mode': 'fs', 'action': 'backup', - 'vssadmin': False, 'shadow': '', 'shadow_path': '', + 'mode': 'fs', 'action': 'backup', 'shadow': '', 'shadow_path': '', 'windows_volume': '', 'command': None, 'metadata_out': False, 'storage': 'swift', 'ssh_key': '', 'ssh_username': '', 'ssh_host': '', 'ssh_port': 22, 'compression': 'gzip' @@ -150,7 +149,8 @@ def backup_arguments(): '-s', '--snapshot', action='store_true', help=('Create a snapshot of the fs containing the resource to backup.' ' When used, the lvm parameters will be guessed and/or the ' - 'default values will be used'), + 'default values will be used, on windows it will invoke ' + 'vssadmin'), dest='snapshot', default=False) arg_parser.add_argument( '--lvm-auto-snap', action='store', @@ -385,11 +385,6 @@ def backup_arguments(): Following is an example of config file: instance = ''', dest='sql_server_conf', default=False) - arg_parser.add_argument( - '--vssadmin', action='store_true', - help='''Create a backup using a snapshot on windows - using vssadmin. Options are: True and False, default is True''', - dest='vssadmin', default=False) arg_parser.add_argument( '--command', action='store', help='Command executed by exec action', diff --git a/freezer/backup.py b/freezer/backup.py index a8eea028..8d3fa83f 100644 --- a/freezer/backup.py +++ b/freezer/backup.py @@ -45,8 +45,8 @@ def backup_mode_sql_server(backup_opt_dict, storage): winutils.stop_sql_server(sql_server_instance) backup(backup_opt_dict, storage, backup_opt_dict.engine) finally: - if not backup_opt_dict.vssadmin: - # if vssadmin is false, wait until the backup is complete + if not backup_opt_dict.snapshot: + # if snapshot is false, wait until the backup is complete # to start sql server again winutils.start_sql_server(sql_server_instance) @@ -213,10 +213,7 @@ def snapshot_create(backup_opt_dict): """ if winutils.is_windows(): - # vssadmin is to be deprecated in favor of the --snapshot flag if backup_opt_dict.snapshot: - backup_opt_dict.vssadmin = True - if backup_opt_dict.vssadmin: # Create a shadow copy. backup_opt_dict.shadow_path, backup_opt_dict.shadow = \ vss.vss_create_shadow_copy(backup_opt_dict.windows_volume)