Upgrading ownCloud 6 to 7

In this post, we will cover changing from SQLite3 to MySQL and updating files.

So nothing good comes from surfing the web.  The FSD Web Penguin was made aware of the latest version of ownCloud version 7.  Here is the process that was finally developed to avoid a few pitfalls.  Do this AT YOUR OWN RISK!!!!  Lucked out here and had several servers and started on the test server not caring if it was destroyed.

  1. Backup your ownCloud folder
    1. The FSD Web Penguin maintains the data folder separate from the server script files.  So back up both.
  2. Backup your ownCloud folder
      1. The FSD Web Penguin maintains the data folder separate from the server script files.  So back up both.
      2. You catch that I mentioned that two times??
  3. Copy the following files to a local location.
    1. /config/config.php
    2. /data/owncloud.db
  4. Dump the SQLite3 database
    1. sqlite3 owncloud.db .dump > dump.sql
  5. Restructure SQLite3 dump to MySQL two sources got me on the right trail:http://paulasmuth.com/blog/migrate_sqlite_to_mysql/
    http://fabianpeter.de/cloud/owncloud-migrating-from-sqlite-to-mysql/#comment-5964 (Update: Broken as of 20150701)

    1. Open dump.sql into a reliable text editor.
    2. Delete the first two lines down to BEGIN TRANSACTION;
    3. delete the last line COMMIT;
    4. Find (“) and replace (`) that was a double quote and the accent mark you never use to the left of 1 on my Model M keyboard.
    5. Find (autoincrement) and replace with (auto_increment)
    6. find (CLOB) and replace (LONGTEXT)
  6. edit your config.php
    1. change dbtype to mysql from sqlite
    2. add the following
      1. ‘dbname’ => ‘database name here,
      2. ‘dbhost’ => ‘database location’,
      3. ‘dbtableprefix’ => ‘oc_’,
      4. ‘dbuser’ => ‘database username’,
      5. ‘dbpassword’ => ‘database password’,
  7. Overwrite your config file on your server.
  8. Import the edited SQL into MySQL
  9. Erase all other files (not config and data) and extract the latest ownCloud
  10. Go to your ownCloud server and run update

UPDATE:  This seemed to break some of my calendars on CALDAV using Thunderbird and Lightning.  The solution was pretty easy.  Go to the web interface and download the ICS file.  Create a new calendar from the web interface.  From Thunderbird re-import the calendar to the newly created calendar.  14 years of calendar seemed to be intact.