Dell EqualLogic PS6210XS EqualLogic Host Integration Tools for Linux Version 1 - Page 81

Examples: Listing Schedules, Example 1: Listing Schedules with Verbose Output

Page 81 highlights

Table 27. List Schedule Optional Command Parameter Parameter Argument Description --name schedule-name Specifies the name of the scheduled operation. Examples: Listing Schedules This section includes examples of listing schedules with verbose output and listing schedules that are enabled in a cron job. Example 1: Listing Schedules with Verbose Output In addition to listing all enabled schedules and showing the command that created the schedule, verbose2 mode also displays the Object ID that uniquely identifies the Smart Copy set. # asmcli list schedule -vv Schedules Name: hourly-schedule Source: /source/VolB Type: snapshot Count: 0 (limit 24) ObjectId: 9-930983-8f4e82980-90bc0ea549ea2096 Command: asmcli create schedule --keep 24 --type snapshot --source /source/VolB Name: user-hourly-schedule Source: /source/VolA Type: snapshot Count: 0 (limit 12) ObjectId: 8-7340fd-7d4c571c2-c33a43ffcda4df82 Command: asmcli create schedule --keep 12 --type snapshot --source /source/VolA 2 schedules found. Example 2: Listing Multiple Schedules Enabled in a Cron Job ASMCLI scheduled operations can be easily incorporated into scripts or cron jobs and enabled. In this example, the schedule named 15 min retains four Smart Copies before deleting the oldest. # asmcli list schedule Schedules Name: 15min Command: asmcli create schedule --keep 4 --output error --retry-count 12 --comment "Test schedule cron: 15 minutes" --type snapshot --collection test1 Name: hourly Command: asmcli create schedule --keep 12 --output error --retry-count 12 --comment "Test schedule cron: hourly" --type snapshot --collection test1 Name: test2 Command: asmcli create schedule --retry-wait 60 --comment "Test schedule test2" --type snapshot --collection test2 Name: test3 Command: asmcli create schedule --keep 0 --type snapshot --collection test3 4 schedules found. # crontab -l PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin Auto-Snapshot Manager Command Line Interface 81

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127

Table 27. List Schedule Optional Command Parameter
Parameter
Argument
Description
--name
schedule-name
Specifies the name of the scheduled operation.
Examples: Listing Schedules
This section includes examples of listing schedules with verbose output and listing schedules that are enabled in a cron job.
Example 1: Listing Schedules with Verbose Output
In addition to listing all enabled schedules and showing the command that created the schedule, verbose2 mode also displays the Object ID
that uniquely identifies the Smart Copy set.
# asmcli list schedule -vv
========================================================
Schedules
========================================================
Name:
hourly-schedule
Source:
/source/VolB
Type:
snapshot
Count:
0 (limit 24)
ObjectId: 9-930983-8f4e82980-90bc0ea549ea2096
Command:
asmcli create schedule --keep 24 --type snapshot --source
/source/VolB
Name:
user-hourly-schedule
Source:
/source/VolA
Type:
snapshot
Count:
0 (limit 12)
ObjectId:
8-7340fd-7d4c571c2-c33a43ffcda4df82
Command:
asmcli create schedule --keep 12 --type snapshot --source
/source/VolA
2 schedules found.
Example 2: Listing Multiple Schedules Enabled in a Cron Job
ASMCLI scheduled operations can be easily incorporated into scripts or cron jobs and enabled. In this example, the schedule named
15
min
retains four Smart Copies before deleting the oldest.
# asmcli list schedule
========================================================
Schedules
========================================================
Name:
15min
Command:
asmcli create schedule --keep 4 --output error --retry-count 12
--comment "Test schedule cron: 15 minutes" --type snapshot --collection test1
Name:
hourly
Command:
asmcli create schedule --keep 12 --output error --retry-count 12
--comment "Test schedule cron: hourly" --type snapshot --collection test1
Name:
test2
Command:
asmcli create schedule --retry-wait 60 --comment "Test schedule test2" --type
snapshot --collection test2
Name:
test3
Command:
asmcli create schedule --keep 0 --type snapshot --collection
test3
4 schedules found.
# crontab -l
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/root/bin
Auto-Snapshot Manager Command Line Interface
81