Revision 05241124 share/man/onedb.1

View differences:

share/man/onedb.1
1 1
.\" generated with Ronn/v0.7.3
2 2
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3 3
.
4
.TH "ONEDB" "1" "June 2017" "" "onedb(1) -- OpenNebula database migration tool"
4
.TH "ONEDB" "1" "July 2017" "" "onedb(1) -- OpenNebula database migration tool"
5 5
.
6 6
.SH "NAME"
7 7
\fBonedb\fR \- OpenNebula database migration tool
......
25 25
 \-\-slave\-dbname dbname     Slave MySQL DB name for OpenNebula
26 26
 \-\-slave\-backup file       Use this file to store SQL dump
27 27
 \-\-extra arg               Extra args
28
 \-s, \-\-start TIME          First time to process
29
 \-e, \-\-end TIME            Last time to process
30
 \-i, \-\-id ID               Filter by ID
31
 \-x, \-\-xpath ID            Filter by xpath
32
 \-e, \-\-expr ID             Filter by expression (UNAME=oneadmin)
33
 \-\-dry                     Do not write in the database, output xml
34
 \-d, \-\-delete              Delete all matched xpaths
28 35
 \-v, \-\-verbose             Verbose mode
29 36
 \-h, \-\-help                Show this message
30 37
 \-V, \-\-version             Show version and copyright information
......
70 77
.IP "\(bu" 4
71 78
sqlite2mysql Migrates a SQLite OpenNebula Database to MySQL valid options: backup
72 79
.
80
.IP "\(bu" 4
81
purge\-history Deletes all but the last history records from non DONE VMs
82
.
83
.IP "" 4
84
.
85
.nf
86

  
87
**WARNING**: This action is done while OpenNebula is running\. Make
88
a backup of the datasbase before executing\.
89
valid options: start_time, end_time
90
.
91
.fi
92
.
93
.IP "" 0
94

  
95
.
96
.IP "\(bu" 4
97
purge\-done Deletes all VMs in DONE state
98
.
99
.IP "" 4
100
.
101
.nf
102

  
103
**WARNING**: This action is done while OpenNebula is running\. Make
104
a backup of the datasbase before executing\.
105
valid options: start_time, end_time
106
.
107
.fi
108
.
109
.IP "" 0
110

  
111
.
112
.IP "\(bu" 4
113
change\-body
114
.
115
.IP "" 4
116
.
117
.nf
118

  
119
You can filter the objects to modify using one of these options:
120

  
121
    * \-\-id: object id, example: 156
122
    * \-\-xpath: xpath expression, example: TEMPLATE[count(NIC)>1]
123
    * \-\-expr: xpath expression, can use operators =, !=, <, >, <= or >=
124
        examples: UNAME=oneadmin, TEMPLATE/NIC/NIC_ID>0
125

  
126
If you want to change a value use a third parameter\. In case you want
127
to delete it use \-\-delete option\.
128

  
129
Change the second network of VMs that belong to "user":
130

  
131
    onedb change\-body vm \-\-expr UNAME=user \e
132
        \'/VM/TEMPLATE/NIC[NETWORK="service"]/NETWORK\' new_network
133

  
134
Delete cache attribute in all disks, write xml, do not modify DB:
135

  
136
    onedb change\-body vm \'/VM/TEMPLATE/DISK/CACHE\' \-\-delete \-\-dry
137

  
138
Delete cache attribute in all disks in poweroff:
139

  
140
    onedb change\-body vm \-\-expr LCM_STATE=8 \e
141
        \'/VM/TEMPLATE/DISK/CACHE\' \-\-delete
142

  
143
**WARNING**: This action is done while OpenNebula is running\. Make
144
a backup of the datasbase before executing\.
145
valid options: id, xpath, expr, dry, delete
146
.
147
.fi
148
.
149
.IP "" 0
150

  
151
.
73 152
.IP "" 0
74 153
.
75 154
.SH "ARGUMENT FORMATS"

Also available in: Unified diff