Jump to content


Photo

Scheduled Metadata Backups

Started by Andrew Levine , 24 February 2009 - 01:56 PM
7 replies to this topic

Andrew Levine Members

Andrew Levine
  • 203 posts

Posted 24 February 2009 - 01:56 PM

I am still new to linux/xenserver so bear with me. I want to schedule metadata backups to a windows share. Is this possible?

If not, what is the best way for me to get metadata info to tape backup? We have 1 xenserver connected to a FC San. This xenserver is the only Linux server we have. Everything else is windows.

Also, when i schedule the metadata backup via xsconsole, how do I know which SR it is going to? I'd prefer it go to to Local Storage. I see "Pool Metadata Backup" on all 3 of my SR's (Local Storage, and two SAN-based SR's).

Basically:

1) How can I automate the metadata backup to a windows share?

2) If #1 is not possible, how do I direct all VM's to have their metadata backed up to Local storage?

3) Any other suggestions?

Thanks!



Guest Members

Guest
  • 40 posts

Posted 24 February 2009 - 02:32 PM

Hi Andrew,

You can install Xencenter console on Windows machine and create a script (.cmd for example) that use "xe" command. In this mode, you can export on windows share.

If you see Documentation:
http://docs.xensource.com/XenServer/5.0.0/1.0/en_gb/reference-5.0.0-1.0-en_gb.pdf
At page 11-12 you can find command to Export VM, VM Metadata etc.

Bye
Gio


Helpful Answer

Andrew Levine Members

Andrew Levine
  • 203 posts

Posted 24 February 2009 - 02:46 PM

Gio,

Thanks for the reply. Another question. I see how to use the XE command from within windows to export metadata for a specific VM. But I do not see a way to do it for all vm's at once. Am I missing something?

Thanks,
Andrew



Guest Members

Guest
  • 40 posts

Posted 02 April 2009 - 04:07 PM

Hi Andrew,

Excuse for delay: I was out.

For your Problem, you have to work with VM parameter .

You have to find a parameter that is Equal on all VM.

To obtain parameter list you can use: xe vm-param-list uuid=

For Example, if you want to turn-off all machine that are in suspend mode you can use parameter "power-state=suspended".

xe -s xenserver -u root -pw xxxxx vm-reset-powerstate power-state=suspended force=true

Bye
Gio



Andrew Levine Members

Andrew Levine
  • 203 posts

Posted 02 April 2009 - 04:25 PM

Gio,

Thanks for the reply. I found in the manual the pool-dump-database command. Do you know if this includes all the metadata for my VMs as well? Do I need to simply backup the pool metadata?

Thanks.



Guest Members

Guest
  • 40 posts

Posted 03 April 2009 - 11:33 AM

Hi Andrew,

The metadata pool is only for Server Pools: not include VM Metadata. You need to use this backup in a "corrupt metadata pool DB" (I used one time in a situation on SAN corruption).
You need to schedule this type of backup.

Bye
gio



Andrew Levine Members

Andrew Levine
  • 203 posts

Posted 03 April 2009 - 12:24 PM

Gio -

I can schedule backup oof all vm metadata where state=running and also do pool metadata backup.

This will lead to one file for the pool, and one for each vm.

How does this differ from going to XenCenter and doing Server Menu...Backup Server? This option leads to a much bigger file with an .xbk extension. Can this procedure be scripted?

If I script metadata backups with xe from the command line, should I also be giving these files an .xbk extension? Thanks!

Edited by: Andrew Levine on Apr 3, 2009 9:11 AM



Andrew Levine Members

Andrew Levine
  • 203 posts

Posted 03 April 2009 - 12:24 PM

Ignore this please, sorry!