Dobrica Pavlinušić's random unstructured stuff
WebGUI upgrade 2010

This page is continuation from WebGUI upgrade from 7.4.39 to 7.

Create snapshot of production

Where is WebGUI ?

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

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

Create LVM snapshot

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

rsync config

        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 =
        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

On development machine

Create webgui-upgrade filesystem for upgrade

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! - 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 /mnt/webgui-upgrade/

This takes some time...

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

Create LXC configuration;a=history;f=webgui-upgrade

On machine used for testing

dpavlin@t61p:~$ cat /etc/hosts

# webgui-upgrade psihologija.ffzg.hr


Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.