<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://easylinux.info/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Upgrades - Revision history</title>
		<link>http://easylinux.info/index.php?title=Upgrades&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.1</generator>
		<lastBuildDate>Thu, 20 Jun 2013 00:38:56 GMT</lastBuildDate>
		<item>
			<title>Perspectoff at 16:29, 13 July 2011</title>
			<link>http://easylinux.info/index.php?title=Upgrades&amp;diff=27739&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page is an aid to me to remember what I have done during upgrades. They may be out-of-date (take them with a grain of salt).&lt;br /&gt;
&lt;br /&gt;
== Karmic to Lucid ==&lt;br /&gt;
=== Basic steps ===&lt;br /&gt;
* Shrank the Windows XP partition using [[Multiple_OS_Installation#Windows_XP_.28or_earlier.29|this info]]. This took about 1 hour.&lt;br /&gt;
* Used GParted on an Ubuntu (or Kubuntu Natty or later) LiveCD to [[Manipulating_Partitions#Creating_and_.22moving.22_free_space|move]] my 100 Mb boot partition to the left.&lt;br /&gt;
* Used GParted to [[Manipulating_Partitions#Creating_and_.22moving.22_free_space|expand]] the extended partition into the free space.&lt;br /&gt;
* Used GParted to [[Manipulating_Partitions#Creating_and_.22moving.22_free_space|move]] the swap partition to the left.&lt;br /&gt;
* Used GParted to [[Manipulating_Partitions#Creating_and_.22moving.22_free_space|move]] the main partition to the left. This took 2 hours.&lt;br /&gt;
* Used GParted to create a new ext4 partition using the remaining free space.&lt;br /&gt;
* Downloaded and [https://help.ubuntu.com/community/BurningIsoHowto burned] a 64-bit server version of the new OS. (Remembered to ''chmod 777 /dev/sr0'' to make sure K3b works.) I prefer the server version mostly because it gives the quickest installation. On my computer 64-bit runs significantly faster than 32-bit.&lt;br /&gt;
* Changed the BIOS to allow [[Boot_from_a_Live_CD|booting]] from a CD/DVD.&lt;br /&gt;
* Connected with a wired Ethernet connection. Installed the new OS to the free space, using a manual partition installation to the recently created ext4. Because I already had formatted the partition with GParted, I did not format it again and &amp;quot;kept the existing data.&amp;quot; I did '''not''' encrypt my home directory because the email server cannot tolerate an encrypted home directory. '''No''' automatic updates, because automatic updates have made certain packages dysfunctional in the past. (Instead, I periodically review the proposed updates manually and then do supervised updates from time to time.) I did '''not''' install any extra packages at this time, in the interest of speed. I did '''not''' install Grub2 to the Master Boot Record (nor to the boot partition), but installed Grub only to the new partition (e.g. on /dev/''sda7''). This is because I have a boot partition (with Grub Legacy) that controls the boot menu and OS selection.&lt;br /&gt;
* Wrote down the user name and password (as well as the name of the server), on a piece of paper which I taped to the inside of the computer case for future reference.&lt;br /&gt;
* Rebooted into the first OS, from which (using ''sudo dolphin'') I edited (in the boot partition) Grub Legacy's /boot/grub/menu.lst (opening it with the text editor kate). Used the absolute position of the partition (hd0,6) for /dev/sda7 as the rootnoverify location, and then chainloaded. Made sure the new OS was the first in the menu. Made sure there was a [[Ubuntu:All#Protecting_Grub_Legacy_from_cracking|Grub Legacy password]]. Added the Grub Legacy password to the paper taped to the inside of the case. Rebooted.&lt;br /&gt;
* Logged on and set a root user password (''sudo passwd root''). Added this root password to the piece of paper taped to the inside of the case.&lt;br /&gt;
* Updated the repositories (''sudo apt-get update'') and upgraded the existing packages (''sudo apt-get upgrade''). Rebooted (''sudo reboot'').&lt;br /&gt;
* Changed the BIOS to set the Hard Drive as the first [[Boot_from_a_Live_CD|boot device]] and disabled all other boot devices.&lt;br /&gt;
* Added a KDE (Kubuntu) desktop (''sudo apt-get install kubuntu-desktop''). This took 45 minutes. Rebooted (''sudo reboot'').&lt;br /&gt;
* Removed extraneous desktop and taskbar widgets. Customized my desktop wallpaper.  Changed to a Classic menu. Using Settings -&amp;gt; System Settings, turned off audible notifications for the KDE System Notifications, chose the Oxygen theme from the Style -&amp;gt; Workspace menu, and chose ''Centered'' Placement for the Window Behavior:Advanced setting. Customized the Advanced: Login Manager: Theme to the one one I like.&lt;br /&gt;
* Installed the Internet: Mozilla Firefox Browser. Customized Firefox, installing NoScript and AdBlock plus.&lt;br /&gt;
* Customized the menu, including Kubuntuguide and Ubuntuguide.&lt;br /&gt;
* Customized Dolphin, Dolphin as root, Kate, and Kate as root. Added Konsole Terminal, Dolphin, and Dolphin as root to Panel bar and customized panel bar.&lt;br /&gt;
* Edited the Grub2 settings, including those to [[Ubuntu:All#Protecting_Grub2_from_cracking|add a Grub2 password]]:&lt;br /&gt;
 sudo kate /etc/default/grub&lt;br /&gt;
 sudo update-grub&lt;br /&gt;
* Installed important packages:&lt;br /&gt;
 sudo apt-get install kubuntu-restricted-extras&lt;br /&gt;
* Installed [[Ubuntu:All#libdvdcss|libdvdcss]].&lt;br /&gt;
* Installed the LAMP server (LINUX, Apache2, MySQL, PHP):&lt;br /&gt;
 sudo tasksel install lamp-server&lt;br /&gt;
:Set the root superuser MySQL password and wrote the MySQL superuser password on the paper taped to the inside of the case.&lt;br /&gt;
* Installed multiple packages I like:&lt;br /&gt;
 sudo apt-get install firestarter filezilla krdc x11vnc thunderbird php5-cli phpmyadmin &lt;br /&gt;
&lt;br /&gt;
Selected ''apache2'' during the phpadmin installation and allow the database to be configured for phpmyadmin with database-common (''Yes''). Use the root superuser's MySQL password for phpmyadmin configuration.&lt;br /&gt;
* Set up remote connections with the [[Ubuntu:All#Krdc_VNC_client|KRDC client]] (notably to the old system, through the LAN).&lt;br /&gt;
* Set up X11VNC Server (-forever, Enable launch feedback, Place in System Tray) and opened firewall ports for LAN only. &lt;br /&gt;
* Installed (then customised) multiple optional packages I sometimes use:&lt;br /&gt;
 sudo apt-get install vlc kaffeine audacious k9copy ffmpeg choqok konversation&lt;br /&gt;
* Configured the [[Ubuntu:All#Screensavers|screensaver]] and set the primary user for [[Ubuntu:All#Automatic_user_login|automatic login]]. Made sure the [[Boot_from_a_Live_CD|BIOS]] allowed for automatic re-power-on after a power failure.&lt;br /&gt;
* Removed the network-manager modules.&lt;br /&gt;
 sudo apt-get --purge remove network-manager-kde network-manager-pptp network-manager knm-runtime network-manager-pptp-gnome&lt;br /&gt;
* Edited the /etc/network/interfaces configuration file for use with a [[Ubuntu:All#Set_a_static_IP_address|static IP]].&lt;br /&gt;
* Added a (root user) cron event for reloading the network interface daily. (This is a failsafe for flaky networking hiccoughs.)&lt;br /&gt;
 sudo crontab -e&lt;br /&gt;
and added:&lt;br /&gt;
 03 03 * * * /etc/init.d/networking restart&lt;br /&gt;
* Installed the network printer.&lt;br /&gt;
* Installed Enigmail for Thunderbird. Installed Lightning if using 32-bit, or Sunbird for 64-bit.&lt;br /&gt;
* Enabled the Firestarter firewall:&lt;br /&gt;
:* Incoming ports: 80, custom SSH port, 143, 993, 25, 587, 5900 from selected LAN IPs&lt;br /&gt;
:* Outgoing ports: 80, 443, 143, 993&lt;br /&gt;
:* Incoming/outgoing connections to network printer(s) and NAS.&lt;br /&gt;
&lt;br /&gt;
*Increased the php.ini filesize limits:&lt;br /&gt;
 sudo kate /etc/php5/apache2/php.ini&lt;br /&gt;
 sudo kate /etc/php5/cli/php.ini&lt;br /&gt;
&lt;br /&gt;
:and changed:&lt;br /&gt;
 memory_limit = 256M&lt;br /&gt;
 upload_max_filesize = 20M&lt;br /&gt;
 post_max_size = 30M&lt;br /&gt;
&lt;br /&gt;
=== Mail Server ===&lt;br /&gt;
* Set up the [[Mail_Server_setup|Mail server]] using the [[Mail_Server_setup#Single_User_Quick_Setup|Single User Setup]] with one account.&lt;br /&gt;
&lt;br /&gt;
:*Created users on the new system for each ''emailusername''. &lt;br /&gt;
:*[[Mail_Server_setup#Moving_Maildir_directories|Copied]] the /home/''emailusername''/Maildir directories from the old system to the new one.&lt;br /&gt;
 sudo mkdir /home/''mailuser1''/Maildir/&lt;br /&gt;
 sudo mkdir /home/''mailuser2''/Maildir/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
 sudo chown ''mailuser1'':''mailuser1'' /home/''mailuser1''/Maildir/&lt;br /&gt;
 sudo chown ''mailuser2'':''mailuser2'' /home/''mailuser1''/Maildir/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
 sudo cp -pr /media/''olddisk''/home/''mailuser1''/Maildir/* /home/''mailuser1''/Maildir/&lt;br /&gt;
 sudo cp -pr /media/''olddisk''/home/''mailuser2''/Maildir/* /home/''mailuser2''/Maildir/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
This has to be done separately for .folders:&lt;br /&gt;
 sudo cp -pr /media/''olddisk''/home/''mailuser1''/Maildir/.* /home/''mailuser1''/Maildir/&lt;br /&gt;
 sudo cp -pr /media/''olddisk''/home/''mailuser2''/Maildir/.* /home/''mailuser2''/Maildir/&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
I'm not sure what the required permissions for the mail is, so I initially made them chmod 777.&lt;br /&gt;
 sudo chmod 777 -R /home/''mailuser1''/Maildir/&lt;br /&gt;
 sudo chmod 777 -R /home/''mailuser2''/Maildir&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Once I determined the correct user (e.g. ''emailuser'', ''root'', ''postfix'', or ''vmail'', depending on the system) I then changed the owner to the correct owner (chown ''user'':''user'') and chmod to 700 for all the Maildir directories.&lt;br /&gt;
&lt;br /&gt;
* Remove exim4:&lt;br /&gt;
 sudo apt-get remove exim4&lt;br /&gt;
&lt;br /&gt;
This works through the command line but not through the package manager (which will try to remove drupal6 as well if drupal6 was installed).&lt;br /&gt;
&lt;br /&gt;
*Install postfix:&lt;br /&gt;
 sudo apt-get install postfix&lt;br /&gt;
 sudo apt-get install -f&lt;br /&gt;
&lt;br /&gt;
*Install dovecot-postfix:&lt;br /&gt;
 sudo apt-get install dovecot-postfix&lt;br /&gt;
 sudo apt-get install -f&lt;br /&gt;
&lt;br /&gt;
*Copied postfix settings files from old system to new system:&lt;br /&gt;
:*/etc/postfix/main.cf&lt;br /&gt;
&lt;br /&gt;
:and made sure the correct dovecot processor was being used. &lt;br /&gt;
&lt;br /&gt;
Also, email files in Maildir folders are designated with the name of the original server. When moving to a new server, it may be necessary to include the name of the old server as a destination in the Postfix main.cf configuration file:&lt;br /&gt;
&lt;br /&gt;
 mydestination = ''oldserver.oldomain.org'', ''newserver.newdomain.org'' &lt;br /&gt;
&lt;br /&gt;
*Edited the dovecot settings to match the old system&lt;br /&gt;
:* /media/''olddisk''/etc/dovecot/dovecot-postfix.conf -&amp;gt; /etc/dovecot/conf.d/01-dovecot-postfix.conf&lt;br /&gt;
&lt;br /&gt;
*Ensured all the certificates match:&lt;br /&gt;
 sudo ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/certs/ssl-mail.pem&lt;br /&gt;
 sudo ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/private/ssl-mail.key&lt;br /&gt;
&lt;br /&gt;
* Restarted dovecot and postfix and checked the firewall for open ports.&lt;br /&gt;
&lt;br /&gt;
=== WebDAV ===&lt;br /&gt;
[[U_WebDAV|WebDAV]] is an easy way to transfer files. Setting this up allows a central place for file transfers (other than as email attachments).&lt;br /&gt;
&lt;br /&gt;
*The old server had a WebDAV folder, which I add to Dolphin on the new system:&lt;br /&gt;
:Dolphin -&amp;gt; ''Right-click'' on Places column --&amp;gt; Add Entry... -&amp;gt; Label: ''WebDavOldSystem''&lt;br /&gt;
: -&amp;gt; Location: webdav://''mydomain.org''/''webdav''&lt;br /&gt;
&lt;br /&gt;
:This allowed files to be initially transferred from the old system.&lt;br /&gt;
&lt;br /&gt;
* Set up a [[U_WebDAV|WebDav]] folder on the new system in a similar location and with identical permission settings to the old one. (This is important because I have WebDAV settings on many clients and do not want to have to change all their settings.)&lt;br /&gt;
 sudo chown www-data:''user'' /home/''user''/WebDAV1&lt;br /&gt;
 sudo chmod 660 /home/''user''/WebDAV1&lt;br /&gt;
&lt;br /&gt;
* (Using VNC (KRDC) to access the old system on one side) I opened the WebDAV1 folder on both the old system and the new system using Dolphin. I copied the contents of the old system's WebDAV1 folder to the new system's WebDAV1 folder (including the digestpasswd.dav file), maintaining the correct permissions.&lt;br /&gt;
&lt;br /&gt;
* Created a symbolic link to the WebDAV1 folder in /var/www:&lt;br /&gt;
 sudo ln -s /home/''user''/WebDAV1 /var/www/WebDAV1&lt;br /&gt;
&lt;br /&gt;
* Enabled the Apache2 Digest Authentication and dav filesystem modules on the new system:&lt;br /&gt;
 sudo a2enmod auth_digest&lt;br /&gt;
 sudo a2enmod dav_fs&lt;br /&gt;
&lt;br /&gt;
* Copied Apache2 /etc/apache2/conf.d/webdav from the old system to the new system.&lt;br /&gt;
&lt;br /&gt;
* Note: The Alias for the WebDAV folder is found in the /etc/apache2/sites-available/''mydomain'' file, with the format:&lt;br /&gt;
  Alias /webdav1 /var/www/WebDAV1/''subfolder''&lt;br /&gt;
  #&lt;br /&gt;
  &amp;lt;Directory /var/www/WebDAV1/&amp;gt;&lt;br /&gt;
    Options Indexes MultiViews&lt;br /&gt;
    AllowOverride None&lt;br /&gt;
    Order allow,deny&lt;br /&gt;
    allow from all&lt;br /&gt;
  &amp;lt;/Directory&amp;gt;&lt;br /&gt;
  #&lt;br /&gt;
   &amp;lt;Location /webdav1&amp;gt;&lt;br /&gt;
     DAV On&lt;br /&gt;
     AuthType Digest&lt;br /&gt;
     AuthName &amp;quot;webdav1digest&amp;quot;&lt;br /&gt;
     AuthUserFile /var/www/WebDAV1/digestpasswd.dav&lt;br /&gt;
     Require valid-user&lt;br /&gt;
   &amp;lt;/Location&amp;gt;&lt;br /&gt;
  &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
  #&lt;br /&gt;
&lt;br /&gt;
=== Copy Apache2 files ===&lt;br /&gt;
* Backed up the new system's Apache2 folder.&lt;br /&gt;
* Copied the /etc/apache2/sites-available folder from the old system to the new system.&lt;br /&gt;
* Enabled the rewrite module:&lt;br /&gt;
 sudo a2enmod rewrite&lt;br /&gt;
* Enable the proxy pass modules:&lt;br /&gt;
 sudo a2enmod proxy_http&lt;br /&gt;
 sudo a2enmod proxy&lt;br /&gt;
* Restarted Apache2:&lt;br /&gt;
 sudo /etc/init.d/apache2 restart&lt;br /&gt;
&lt;br /&gt;
=== ddclient ===&lt;br /&gt;
This is not needed, of course, if your ISP issues your site a Static IP address. However, I have always had a [[Dynamic_IP_servers|Dynamic IP]] address from my ISP.&lt;br /&gt;
* Copied the /etc/ddclient.conf from the old system to the new system.&lt;br /&gt;
* Installed ddclient, using the variables from the old system's ddclient.conf file:&lt;br /&gt;
 sudo apt-get install ddclient&lt;br /&gt;
* Edited the newly created /etc/default/ddclient and /etc/ddclient.conf files to contain the settings from the old system's /etc/ddclient.conf file.&lt;br /&gt;
* Added a [[Dynamic_IP_servers#Run_ddclient_using_cron|once-daily cron event]] to force an update.&lt;br /&gt;
&lt;br /&gt;
=== home files ===&lt;br /&gt;
*Moved (through WebDAV) the /home/''user'' files from the old system to a /home/''user''/''oldsystembackup'' folder on the new system.&lt;br /&gt;
&lt;br /&gt;
=== Copy MySQL databases === &lt;br /&gt;
* Made a list of databases and stored it in a text file. (I used phpMyAdmin to display the list of databases.)&lt;br /&gt;
* On the new server, created an identical set of databases using the command:&lt;br /&gt;
 sudo mysqladmin --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; create ''userdb1''&lt;br /&gt;
 sudo mysqladmin --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; create ''userdb2''&lt;br /&gt;
 ...&lt;br /&gt;
* Using the list of database user names and database user passwords, re-created the database users. The database user/password for each database must match any configuration files (e.g. for MediaWiki, Drupal, etc.) Generally it is worthwhile to keep this list in a file for future reference and upgrades.&lt;br /&gt;
 sudo mysql --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON ''userdb1'' TO ''userdb1user''@localhost IDENTIFIED BY &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''userdb1userpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;; &lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON ''userdb2'' TO ''userdb2user''@localhost IDENTIFIED BY &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''userdb2userpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
 ...&lt;br /&gt;
 mysql&amp;gt; flush privileges; &lt;br /&gt;
 mysql&amp;gt; \q&lt;br /&gt;
&amp;lt;!---&amp;gt;This doesn't work.&lt;br /&gt;
::This can be done in single line format:&lt;br /&gt;
 sudo mysql --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; GRANT ALL PRIVILEGES ON ''userdb1''.* TO ''userdb1user''@localhost IDENTIFIED BY &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''userdb1userpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 sudo mysql --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; GRANT ALL PRIVILEGES ON ''userdb2''.* TO ''userdb2user''@localhost IDENTIFIED BY &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''userdb2userpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;---&amp;gt;&lt;br /&gt;
* On the old system, backed up the database for each wiki using mysqldump (or phpMyAdmin):&lt;br /&gt;
 sudo mysqldump --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; ''userdb1'' &amp;gt; ''userdb1''.sql&lt;br /&gt;
 sudo mysqldump --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; ''userdb2'' &amp;gt; ''userdb2''.sql&lt;br /&gt;
 ...&lt;br /&gt;
:*Stored them in a folder. Copied the folder to the new system.&lt;br /&gt;
:* Restored the databases on the new system with mysql:&lt;br /&gt;
 sudo mysql --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; ''userdb1'' &amp;lt; ''userdb1''.sql&lt;br /&gt;
 sudo mysql --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; ''userdb2'' &amp;lt; ''userdb2''.sql&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
::For large databases that are balky to import, use:&lt;br /&gt;
 sudo mysql --user=root --password=&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''rootmysqlpw''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 mysql&amp;gt; use ''userdb95''&lt;br /&gt;
 mysql&amp;gt; source ''userdb95''.sql&lt;br /&gt;
 mysql&amp;gt; \q&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&amp;gt;&lt;br /&gt;
== Copy MySQL database folders ==&lt;br /&gt;
*Copied the /var/lib/mysql subfolders (each representing a MySQL database) from the old system to the new system.&lt;br /&gt;
&lt;br /&gt;
=== Copy PostgreSQL databases === &lt;br /&gt;
*Copied the /var/lib/postgresql subfolders (each representing a PostgreSQL database) from the old system to the new system.&amp;lt;---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mediawiki ===&lt;br /&gt;
For direct moves of Mediawiki, the versions must be identical. My old version is MW 1.16.1, PHP 5.2.10-2, and MySQL 5.1.37. My new system has MW 1.15.1, PHP 5.3.2, and MySQL 5.1.41.&lt;br /&gt;
&lt;br /&gt;
* Install Mediawiki 1.15.1. This is done mostly to make sure that all dependencies are satisfied.&lt;br /&gt;
 sudo apt-get install mediawiki&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&amp;gt;&lt;br /&gt;
* Upgrade to MW 1.16.1. Fortunately, I had archived a mediawiki-1.16.1.tar.gz (since Mediawiki does not make archives of every version readily available). I extracted this archive and copied the extracted contents to /usr/share/mediawiki, overwriting any files already there. This upgraded MW to 1.16.1.&lt;br /&gt;
&amp;lt;---&amp;gt;&lt;br /&gt;
* Copied all the Mediawiki folders from the old system to the new system:&lt;br /&gt;
:*/etc/mediawiki&lt;br /&gt;
:*/var/lib/mediawiki&lt;br /&gt;
:*/usr/share/mediawiki&lt;br /&gt;
&lt;br /&gt;
This worked best using a direct copy method. Note the -p (include permissions) and -r (recursive). Because most USB/Flash/Thumb drives are formatted with FAT32 and FAT32 does not keep the file permissions intact (even when copying with -p), it is best to backup on a hard drive, to a CD/DVD, or to another location with rsync. It is also tricky to maintain file permissions when using NFS or SMB networked folders, since root permissions (root squashing) are disabled by default and recent protocols do not easily permit the &amp;quot;no_root_squash&amp;quot; function. MediaWiki is very finicky about file permissions; if you do not keep them intact moving a website will be difficult because you will then be required to recreate the correct permissions manually. This example is for directly backing up from one partition to another on a hard drive:&lt;br /&gt;
 sudo cp -pr /''olddrive''/etc/mediawiki/* /etc/mediawiki/&lt;br /&gt;
 sudo cp -pr /''olddrive''/var/lib/mediawiki/* /var/lib/mediawiki/&lt;br /&gt;
 sudo cp -pr /''olddrive''/usr/share/mediawiki/* /usr/share/mediawiki/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---&amp;gt;&lt;br /&gt;
:*/var/lib/mediawiki/config&lt;br /&gt;
:*/var/lib/mediawiki/extensions&lt;br /&gt;
:*/var/lib/mediawiki/images&lt;br /&gt;
&lt;br /&gt;
These folders were owned (with group) ''user'' with chmod 664, except for config, which was chmod 660.&lt;br /&gt;
&lt;br /&gt;
* Also must change ownership/permissions for /usr/share/mediawiki/skins/common/images (owner:owner 644).&lt;br /&gt;
&lt;br /&gt;
* Backed up the new system's /etc/mediawiki folder and copied the /etc/mediawiki folder from the old system to the new system. This copes files only (not symbolic links, which must be recreated).&lt;br /&gt;
&lt;br /&gt;
* Made sure the Images folder for each subsite had permissions for www-data:&lt;br /&gt;
 sudo chown -R ''user'':www-data /etc/mediawiki/''subsite1''/images&lt;br /&gt;
 sudo chmod 770 -R /etc/mediawiki/''subsite1''/images&lt;br /&gt;
 sudo chown -R ''user'':www-data /etc/mediawiki/''subsite2''/images&lt;br /&gt;
 sudo chmod 770 -R /etc/mediawiki/''subsite2''/images&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;---&amp;gt;&amp;lt;!---&amp;gt;&lt;br /&gt;
* Recreated symbolic links for the individual sites.&lt;br /&gt;
 sudo ln -s /usr/share/mediawiki/* /etc/mediawiki/''subsite1''/.&lt;br /&gt;
 sudo ln -s /usr/share/mediawiki/* /etc/mediawiki/''subsite2''/.&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Copy symbolic links ===&lt;br /&gt;
* Re-created all the folders and symbolic links in the old system's /var/www folder to the new system's /var/www folder by using a batch file or copying the entire folder:&lt;br /&gt;
 sudo cp -pr /''olddrive''/var/www/* /var/www/&lt;br /&gt;
&lt;br /&gt;
* Copied the /etc/apache2/sites-available folder and re-created the symbolic links of the /etc/apache2/sites-enabled folder using a batch file (or manually) or by copying the folders:&lt;br /&gt;
 sudo cp -pr /''olddrive''/etc/apache2/sites-available/* /etc/apache2/sites-available/&lt;br /&gt;
 sudo cp -pr /''olddrive''/etc/apache2/sites-enabled/* /etc/apache2/sites-enabled/&lt;/div&gt;</description>
			<pubDate>Wed, 13 Jul 2011 16:29:10 GMT</pubDate>			<dc:creator>Perspectoff</dc:creator>			<comments>http://easylinux.info/wiki/Talk:Upgrades</comments>		</item>
	</channel>
</rss>