OpenVZ Forum



Members   Search      Help    Register    Login    Home
Home » General » Support » Difference between root and private, what to take in backup?
Difference between root and private, what to take in backup? [message #12277] Mon, 23 April 2007 22:57 Go to next message
ugob is currently offline ugob
Messages: 271
Registered: March 2007
Senior Member
From: *152-81-70.mc.videotron.ca
Hi,

I've started playing with vzdump and it reminded me that I have one question about OpenVZ: What is the difference between root and the private area?

What do I need to take in backup?

With vzdump, you have several options for taking the backup.


(without argument) -> no snapshot, just archive the VE private area and configuration files to the default dump directory

--stop (stop/start VPS if running)
--suspend (suspend/resume VPS when running)
--snapshot (Use LVM snapshot when running)

Which one is better for what kind of environment?

For example, I think that the without any arguments is ok for my VE running only SSH.

However, for my RT VE (httpd/mysql), I guess I should use --suspend or --stop to make sure the mysql data is consistent...

What is the big difference between --snapshot and --stop? The time needed for the VE to stop and boot?

Regards,
Ugo


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: Difference between root and private, what to take in backup? [message #12281 is a reply to message #12277] Tue, 24 April 2007 03:59 Go to previous messageGo to next message
Vasily Tarasov is currently offline Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
From: *sw.ru
Quote:

I've started playing with vzdump and it reminded me that I have one question about OpenVZ: What is the difference between root and the private area?


When VE is stopped you have contents only in private/<veid> directory. When VE starts simfs filesystem is mounted on root/<veid>. Simfs is a mirror-like filesystem: it mirrors the contents of private/<veid> to root/<veid>. The reason to use simfs is to isolate VE's filesystem from HN's one.

As concerns vzdump - I've never used it. So the question is mainly to its author.

Vasily.
Re: Difference between root and private, what to take in backup? [message #12289 is a reply to message #12281] Tue, 24 April 2007 06:38 Go to previous messageGo to next message
ugob is currently offline ugob
Messages: 271
Registered: March 2007
Senior Member
From: *152-81-70.mc.videotron.ca
Vasily Tarasov wrote on Tue, 24 April 2007 03:59

Quote:

I've started playing with vzdump and it reminded me that I have one question about OpenVZ: What is the difference between root and the private area?


When VE is stopped you have contents only in private/<veid> directory. When VE starts simfs filesystem is mounted on root/<veid>. Simfs is a mirror-like filesystem: it mirrors the contents of private/<veid> to root/<veid>. The reason to use simfs is to isolate VE's filesystem from HN's one.



Ok, so I guess one should never edit files directly in the root?

If, for example, I want to make a backup of my VE that is only an ftp server, should I do a rsync of /home in the root or private?

Thanks


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: Difference between root and private, what to take in backup? [message #12292 is a reply to message #12289] Tue, 24 April 2007 07:56 Go to previous messageGo to next message
Vasily Tarasov is currently offline Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
From: *sw.ru
The best way is to stop VE and then do a backup of private area, otherwise inconsistent backup can be performed.

Vasily.
Re: Difference between root and private, what to take in backup? [message #12293 is a reply to message #12292] Tue, 24 April 2007 08:01 Go to previous messageGo to next message
ugob is currently offline ugob
Messages: 271
Registered: March 2007
Senior Member
From: *152-81-70.mc.videotron.ca
Vasily Tarasov wrote on Tue, 24 April 2007 07:56

The best way is to stop VE and then do a backup of private area, otherwise inconsistent backup can be performed.



Even if we use --suspend?

Ugo


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: Difference between root and private, what to take in backup? [message #12302 is a reply to message #12293] Tue, 24 April 2007 10:57 Go to previous messageGo to next message
Vasily Tarasov is currently offline Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
From: *sw.ru
And what is "--suspend"? If it is an option of vzdump - then I don't know, I've never looked at its internal design Wink

Vasily.
Re: Difference between root and private, what to take in backup? [message #12303 is a reply to message #12302] Tue, 24 April 2007 11:04 Go to previous messageGo to next message
ugob is currently offline ugob
Messages: 271
Registered: March 2007
Senior Member
From: 70.55.159*
Vasily Tarasov wrote on Tue, 24 April 2007 10:57

And what is "--suspend"? If it is an option of vzdump - then I don't know, I've never looked at its internal design Wink

Vasily.


I guess it uses the same mechanism as

vzctl chkpnt VEID --suspend

Ugo


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: Difference between root and private, what to take in backup? [message #12304 is a reply to message #12303] Tue, 24 April 2007 11:24 Go to previous messageGo to next message
Vasily Tarasov is currently offline Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
From: *sw.ru
Then vzdump also saves checkpointing file (contents all VE processes state and alike information), does it? If so, then it's rather good method for live-backup on my mind.

Vasily.
Re: Difference between root and private, what to take in backup? [message #12502 is a reply to message #12277] Tue, 01 May 2007 15:38 Go to previous messageGo to next message
mgiammarco is currently offline mgiammarco
Messages: 1
Registered: May 2007
Junior Member
From: *dcpool.ip.kpnqwest.it
I am interested too in this thread. I have one lvm partition with all my virtual machines. I would like to backup them with backuppc.

It would be a nice thing that I can restore the virtual machine several times in several directories as a sort of "homemade" template. With backuppc is easy to do so.

I would like to be sure to backup the right thing: home or private?

And I suppose I do not need to suspend virtual machines because I backup with snapshots.

Thanks for help and for this interesting thread.

Mario
Re: Difference between root and private, what to take in backup? [message #12617 is a reply to message #12277] Fri, 04 May 2007 08:59 Go to previous messageGo to next message
dev is currently offline dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

From: *7ka.mipt.ru
regardless of vzdump let me explain how it works and what should be backuped.

root/VEID is a directory where everything is mounted, it is a filesystem how VE sees it. It has /proc and /sysfs mounted inside and can have other filesystems mounted or bind mounted by the user inside.

private/VEID is actually a storage for VE files. It is how it really looks like on the disk. In the simplest case it looks pretty much the same as root.
So this is the directory which should be backuped and restored if needed. i.e. private, not root. Even if VE is started, private - not root should be backup.

Hope this helps!


http://static.openvz.org/userbars/openvz-developer.png
Re: Difference between root and private, what to take in backup? [message #12635 is a reply to message #12277] Fri, 04 May 2007 20:17 Go to previous message
ugob is currently offline ugob
Messages: 271
Registered: March 2007
Senior Member
From: *direcpc.com
Thanks, it is a lot clearer now Smile

Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Previous Topic:Anyone tried to create a Centos-5-beta os template?
Next Topic:2.6.21.1 support?
Goto Forum:
  


Current Time: Mon May 20 17:33:27 EDT 2013
Powered by FUDforum Powered by Parallels Virtuozzo Containers