Netbackup: verschil tussen versies
Uit Documents
k |
|||
| (9 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
| Regel 1: | Regel 1: | ||
== Netbackup cheatsheet == | == Netbackup cheatsheet == | ||
| − | Check Drive status | + | === Check Drive status === |
| − | + | <syntaxhighlight lang="bash">/opt/openv/volmgr/bin/vmoprcmd -dp</syntaxhighlight> | |
| + | And/Or | ||
| + | <syntaxhighlight lang="bash">/opt/openv/volmgr/bin/tpconfig -d</syntaxhighlight> | ||
| − | Add cleaning type | + | === Change Drive status === |
| + | <syntaxhighlight lang="bash">/opt/openv/volmgr/bin/tpconfig -update -drive <index> -drstatus UP</syntaxhighlight> | ||
| + | |||
| + | === Scan bus === | ||
| + | <syntaxhighlight lang="bash">/opt/openv/volmgr/bin/sgscan</syntaxhighlight> | ||
| + | |||
| + | === Add cleaning type === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
/opt/openv/volmgr/bin/vmchange -p 0 -m <media> #change the pool to none | /opt/openv/volmgr/bin/vmchange -p 0 -m <media> #change the pool to none | ||
/opt/openv/volmgr/bin/vmchange -new_mt hcart2_clean -m <media> #change the media type to HC2_CLN | /opt/openv/volmgr/bin/vmchange -new_mt hcart2_clean -m <media> #change the media type to HC2_CLN | ||
/opt/openv/volmgr/bin/vmchange -m <media> -n 50 #change number of remaining cleanings | /opt/openv/volmgr/bin/vmchange -m <media> -n 50 #change number of remaining cleanings | ||
| − | </ | + | </syntaxhighlight> |
| + | |||
| + | === Expire backup images between dates === | ||
| + | <syntaxhighlight lang="bash"> | ||
| + | cd /opt/openv/netbackup | ||
| + | for i in `./bin/admincmd/bpimagelist -d 03/07/2011 11:01:18 -e 03/08/2011 04:48:31 -L |grep "Backup ID" |cut -d ":" -f 2`; do ./bin/admincmd/bpexpdate -backupid $i -d 0 -force;done; | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | ; bpimagelist: | ||
| + | : -d means from date | ||
| + | : -e means till date | ||
| + | : -L means long list | ||
| + | |||
| + | Pipe output to filter out the backup ids | ||
| + | |||
| + | Seperate the output to cut out the <backup id> from "Backup ID: <backup id>" | ||
| + | |||
| + | ; bpexpdate: | ||
| + | : -backupid specify backupid | ||
| + | : -d sets expirydate, 0 means immediate | ||
| + | : -force: don't ask user to confirm | ||
| + | |||
| + | |||
| + | === List files in a backup === | ||
| + | Get the list of backups in the catalog specified by a policy: | ||
| + | <syntaxhighlight lang="bash"> | ||
| + | /opt/openv/netbackup/bin/admincmd/bpcatlist -policy <policy> | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | Query the file list specified by client and backupid: | ||
| + | <syntaxhighlight lang="bash"> | ||
| + | /opt/openv/netbackup/bin/admincmd/bpflist -client <client> -rl 10 -backupid <backupid> | ||
| + | </syntaxhighlight> | ||
Huidige versie van 17 aug 2011 om 11:40
Inhoud
Netbackup cheatsheet
Check Drive status
/opt/openv/volmgr/bin/vmoprcmd -dpAnd/Or
/opt/openv/volmgr/bin/tpconfig -dChange Drive status
/opt/openv/volmgr/bin/tpconfig -update -drive <index> -drstatus UPScan bus
/opt/openv/volmgr/bin/sgscanAdd cleaning type
/opt/openv/volmgr/bin/vmchange -p 0 -m <media> #change the pool to none
/opt/openv/volmgr/bin/vmchange -new_mt hcart2_clean -m <media> #change the media type to HC2_CLN
/opt/openv/volmgr/bin/vmchange -m <media> -n 50 #change number of remaining cleaningsExpire backup images between dates
cd /opt/openv/netbackup
for i in `./bin/admincmd/bpimagelist -d 03/07/2011 11:01:18 -e 03/08/2011 04:48:31 -L |grep "Backup ID" |cut -d ":" -f 2`; do ./bin/admincmd/bpexpdate -backupid $i -d 0 -force;done;- bpimagelist
- -d means from date
- -e means till date
- -L means long list
Pipe output to filter out the backup ids
Seperate the output to cut out the <backup id> from "Backup ID: <backup id>"
- bpexpdate
- -backupid specify backupid
- -d sets expirydate, 0 means immediate
- -force: don't ask user to confirm
List files in a backup
Get the list of backups in the catalog specified by a policy:
/opt/openv/netbackup/bin/admincmd/bpcatlist -policy <policy>Query the file list specified by client and backupid:
/opt/openv/netbackup/bin/admincmd/bpflist -client <client> -rl 10 -backupid <backupid>