Dobrica Pavlinušić's random unstructured stuff
WebGUI upgrade 2010: Revision 8
This page is continuation from [WebGUI upgrade] from 7.4.39 to 7.

{toc}

^ Create snapshot of production

^^ Where is WebGUI ?

.pre
root@mjesec:~# vzlist 212005
CTID NPROC STATUS IP_ADDR HOSTNAME
212005 43 running 193.198.212.5 webgui.rot13.org

root@mjesec:~# vzquota stat 212005
resource usage softlimit hardlimit grace
1k-blocks 11474572 20971520 22020096
inodes 140595 286527 315180
.pre

^^ Create LVM snapshot

.pre
root@mjesec:~# lvcreate -s -n vz-snap -L 30g /dev/vg/vz
Logical volume "vz-snap" created

root@mjesec:~# mkdir /mnt/vz-snap

root@mjesec:~# mount /dev/vg/vz-snap /mnt/vz-snap -o ro
.pre

^^ rsync config

.pre
[vz-snap]
comment = /vz read-only snapshot for backup
path = /mnt/vz-snap
use chroot = yes
lock file = /var/lock/rsyncd
read only = yes
list = yes
uid = root
gid = root
strict modes = yes
hosts allow = 10.60.0.201
ignore errors = no
ignore nonreadable = no
transfer logging = no
timeout = 600
refuse options = checksum dry-run
dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz
.pre

^ On development machine

^^ Create webgui-upgrade filesystem for upgrade

.pre
root@stage:~# mkdir /mnt/webgui-upgrade

root@stage:~# lvcreate -n webgui-upgrade -L 50G /dev/stage
Logical volume "webgui-upgrade" created

root@stage:~# mkfs.btrfs /dev/stage/webgui-upgrade

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/stage/webgui-upgrade
nodesize 4096 leafsize 4096 sectorsize 4096 size 50.00GB

root@stage:~# mount /dev/stage/webgui-upgrade /mnt/webgui-upgrade/

root@stage:~# time rsync -ravH --numeric-ids --sparse 10.60.0.9::vz-snap/private/212005 /mnt/webgui-upgrade/

.pre

This takes some time...

.pre
sent 1931305 bytes received 11245927032 bytes 11413351.94 bytes/sec
total size is 11238867558 speedup is 1.00

real 16m25.334s
user 0m48.835s
sys 2m11.820s

root@stage:~# mkdir /mnt/webgui-upgrade/.snap

root@stage:~# btrfsctl -s /mnt/webgui-upgrade/2010-08-05-from-mjesec /mnt/webgui-upgrade/
operation complete
Btrfs Btrfs v0.19

.pre

^^ Create LXC configuration