You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7
7
8
from __future__ importabsolute_import, division, print_function
@@ -19,6 +20,7 @@
19
20
- Manages backup of the cluster configuration.
20
21
author:
21
22
- Shreyas Srish (@shrsr)
23
+
- Sabari Jaganathan (@sajagana)
22
24
options:
23
25
name:
24
26
description:
@@ -28,38 +30,83 @@
28
30
encryption_key:
29
31
description:
30
32
- The encryption_key for a backup file.
33
+
- A minimum of 8 alphanumeric characters is required.
31
34
type: str
32
35
file_location:
33
36
description:
34
37
- The download path and file name for a backup.
38
+
- When O(file_location) is specified, the backup will be created and automatically downloaded to the local machine at the designated path.
35
39
type: str
36
40
backup_key:
37
41
description:
38
42
- The key generated by ND during creation of a backup.
39
43
- This key is required when querying or deleting a backup among multiple backups that have the same name.
40
44
- This key can be obtained by querying the backup.
45
+
- This parameter is not supported on ND v3.2.1 and later.
41
46
type: str
47
+
remote_location:
48
+
description:
49
+
- The name of the remote storage location. This parameter is only supported on ND v3.2.1 and later.
50
+
- If the O(remote_location) parameter is not specified or O(remote_location="") during backup creation, a local backup will be created.
51
+
type: str
52
+
backup_type:
53
+
description:
54
+
- This parameter is only supported on ND v3.2.1 and later.
55
+
- The O(backup_type=config_only) option creates a snapshot that specifically captures the configuration settings of the Nexus Dashboard.
56
+
- The O(backup_type=full) option creates a complete snapshot of the entire Nexus Dashboard.
57
+
type: str
58
+
choices: [ config_only, full ]
59
+
default: config_only
60
+
aliases: [ type ]
42
61
state:
43
62
description:
44
-
- Use C(backup) for creating a backup of the cluster config.
45
-
- Use C(query) for listing all the backed up files.
46
-
- Use C(absent) for deleting a backup job.
63
+
- Use O(state=backup) for creating and downloading a backup of the cluster config for the ND versions < 3.2.1.
64
+
- Use O(state=backup) to create a cluster configuration backup. Automatic download is not supported for the ND versions >= 3.2.1. After creation, use O(state=download) to download the backup file.
65
+
- Use O(state=download) downloading a backup to the local machine, the O(state=download) is only supported on ND v3.2.1 and later.
66
+
- Use O(state=query) for listing all the backed up files.
67
+
- Use O(state=absent) for deleting a backup job.
47
68
type: str
48
-
choices: [ backup, query, absent ]
69
+
choices: [ backup, download, query, absent ]
49
70
default: backup
50
71
extends_documentation_fragment:
51
72
- cisco.nd.modules
52
73
- cisco.nd.check_mode
53
74
"""
54
75
55
76
EXAMPLES=r"""
56
-
- name: Create a Backup
77
+
- name: Create a backup for ND versions < 3.2.1
57
78
cisco.nd.nd_backup:
58
79
name: nexus
59
80
encryption_key: testtest
60
81
file_location: ./nexus.tgz
61
82
state: backup
62
83
84
+
- name: Create a remote backup for ND versions >= 3.2.1
85
+
cisco.nd.nd_backup:
86
+
name: nexus
87
+
encryption_key: testtest1
88
+
remote_location: remote_machine
89
+
state: backup
90
+
91
+
- name: Create a local backup for ND versions >= 3.2.1
92
+
cisco.nd.nd_backup:
93
+
name: nexus
94
+
encryption_key: testtest1
95
+
state: backup
96
+
97
+
- name: Create a backup and download it to the local machine for ND versions >= 3.2.1
98
+
cisco.nd.nd_backup:
99
+
name: nexus
100
+
file_location: ./nexus.tgz
101
+
encryption_key: testtest1
102
+
state: backup
103
+
104
+
- name: Download a local/remote backup for ND versions >= 3.2.1
0 commit comments