Kernel too old on centos5 hostnode for ubuntu 12.04 and 12.10

Getting kernel too old (and a failure to start up) for the ubuntu 12.04 and 12.10 templates on openvz? The newer templates may only work on centos 6 servers, and you may not want to upgrade systems to centos6 yet. Updates continue until Mar 31, 2017 anyway.

You can use the following ubuntu templates instead which are tested to work on centos 5 openvz systems:





You will need to add

ubuntu-12.04 2.6.32

ubuntu-12.10 2.6.32

to /etc/vz/osrelease.conf

Restore cpanel incremental backups in ssh

If you try to restore incremental backups with pkgacct you’ll find at first the backup will not restore. An undocumented feature is you can rename the backup file to cpmove-username and then run restorepkg. In the default set up cpanel will also remove the backup file when done, with “Cleaning up extract directory”, so before the restore you can run chattr +i cpmove-username to keep the directory. When done run chattr -ia cpmove-username and move the folder back to its original name.

I wrote up a script that can be used to restore all incremental backups in a folder as well. Set DIR to be the full path where the files are located. The ARGS variable can be set with restorepkg options like –skipres and/or –force.


# add restorepkg args like --skipres --force

cd $DIR
for i in *; do
#format username/cp/username
if [ -e $i/cp/$i ]; then
# rename backup
mv -v $i cpmove-$i
if [ ! -d cpmove-$i ]; then
echo "Error: cpmove-$i does not exist, is the file system read only?";
# otherwise cpanel will "Cleaning up extract directory" and remove the backup
chattr +iv cpmove-$i
/scripts/restorepkg $ARGS $DIR/cpmove-$i
# move backup file back
chattr -iv cpmove-$i
mv -v cpmove-$i $i