Upgrading owncloud from 10.0.7 to 10.4.1

Hi,

Currently i am using owncloud 10.0.7 which has lots of user data and i want to upgrade the owncloud to 10.4.1 so i have installed new owncloud in a server machine how can i transfer my old owncloud data and database to new version of my owncloud.

Migrating an ownCloud instance is well documented:

https://doc.owncloud.com/server/admin_manual/maintenance/migrating.html

1 Like

While taking mysqldump database backup the db has done the backup and i can able to import to new owncloud db but while i open the existing database in old owncloud with mariadb the owncloud database table is showing as an empty set so if i import the database without any table the database wont reflect in my new owncloud but in my previous owncloud /var/www/html/owncloud/data file there is an owncloud.db file which has a size of 1.3 GB how can i import my db to new owncloud version. What should i do now to sort out the database.

There was an issue template when you started the topic, which you decided not to fill out. So we do not have any information about your server environment.

Reading your last post it seems you are using sqlite as a database.

When you click on backup or restore in the navigation of the link I provided before, you find those pages:
https://doc.owncloud.org/server/latest/admin_manual/maintenance/backup.html
https://doc.owncloud.org/server/latest/admin_manual/maintenance/restore.html

I guess the sqlite section applies to you.

2 Likes

I am not using sqlite3 in my previous owncloud version i am using mariadb and i have attached my previous owncloud which is currently using by all the users and i am getting the DB table as an empty set how can i backup the database and how can i find the tables to my existing owncloud.

While i list the path /var/www/html/owncloud/data i am able to view this .db file i can open this database file in my windows pc it shows the database tables and i tried to convert the db file to sqldump file and i have try to restore the dump file in my current owncloud database it throws an error of syntax error in mariadb.

Your database is quite obviously sqlite and not mariadb. This is where it comes to the issue template again. Provide at least a config report of your OLD installation, see https://doc.owncloud.com/server/admin_manual/configuration/server/occ_command/config_reports_commands.html
Without this we cannot help you.

For your convenience, here is the issue template again:

Steps to reproduce

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:

Web server:

Database:

PHP version:

ownCloud version: (see ownCloud admin page)

Updated from an older ownCloud or fresh install:

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: local/smb/sftp/…

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
1 Like

Steps to reproduce

  1. Upgrading and migrating the owncloud from 10.0.7 to 10.4.1
  2. Currently I am using owncloud 10.0.7 which is running in a server environment and I need to upgrade to latest version of owncloud 10.4.1 and for testing I have installed my ubuntu server in a Virtual Machine Environment in a local PC
  3. I have tried to take a sqldump in a owncloud 10.0.7 version the table has an empty set.

Expected behaviour

Owncloud database dump file should have tables

Actual behaviour

Empty table set in my owncloud database

Server configuration

Operating system : Ubuntu 16.04 Server LTS

Web server: Apache2

Database: Mariadb 10

PHP version: PHP 7.0.

ownCloud version: “10.0.7.2”,

Updated from an older ownCloud or fresh install: Fresh Install

Where did you install ownCloud from: owncloud.org

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access http://example.com/owncloud/index.php/settings/integrity/failed

paste the results into https: No errors have been found.

.

The content of config/config.php:

{

“system”: {

“instanceid”: “oc3lo3f6rcjd”,

“passwordsalt”: “REMOVED SENSITIVE VALUE”,

“secret”: “REMOVED SENSITIVE VALUE”,

“trusted_domains”: [

“192.168.1.11”,

],

“datadirectory”: “/var/www/html/owncloud/data”,

“overwrite.cli.url”: “https://192.168.1.11/owncloud”,

“dbtype”: “sqlite3”,

“version”: “10.0.7.2”,

“logtimezone”: “UTC”,

“installed”: true,

“mail_smtpmode”: “smtp”,

“loglevel”: 1

}

List of activated apps:

Enabled:

  • afterlogic: 1.1.2

  • comments: 0.3.0

  • configreport: 0.1.1

  • contacts: 1.5.4

  • customgroups: 0.3.6

  • dav: 0.3.2

  • federatedfilesharing: 0.3.1

  • federation: 0.1.0

  • files: 1.5.1

  • files_external: 0.7.1

  • files_external_ftp: 0.2.0

  • files_pdfviewer: 0.11.0

  • files_sharing: 0.10.1

  • files_trashbin: 0.9.1

  • files_versions: 1.3.0

  • files_videoplayer: 0.9.8

  • firstrunwizard: 1.1

  • gallery: 16.1.0

  • gpxpod: 2.2.2

  • groupalert: 1.0.5

  • guests: 0.5.0

  • market: 0.2.4

  • notifications: 0.3.2

  • onlyoffice: 2.2.1

  • phonetrack: 0.2.8

  • provisioning_api: 0.5.0

  • systemtags: 0.3.0

  • templateeditor: 0.3

  • twofactor_backup_codes: 0.0.4

  • updatenotification: 0.2.1

Disabled:

  • encryption

  • external

  • theme-example

  • user_external.

Are you using external storage, if yes which one: yes local/smb/sftp/…

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Apache/2.4.18 (Ubuntu)

Operating system: ubuntu

Logs

Web server error log

[Fri Jul 24 14:47:37.282560 2020] [:error] [pid 17108] [client 183.83.241.2:35737] script ‘/var/www/html/remote.php’ not found or unable to stat

[Fri Jul 24 14:48:08.939750 2020] [:error] [pid 17344] [client 183.83.241.2:35756] script ‘/var/www/html/status.php’ not found or unable to stat

[Fri Jul 24 14:48:09.290535 2020] [:error] [pid 17344] [client 183.83.241.2:35756] script ‘/var/www/html/remote.php’ not found or unable to stat

[Fri Jul 24 14:48:40.918366 2020] [:error] [pid 16179] [client 183.83.241.2:35763] script ‘/var/www/html/status.php’ not found or unable to stat

[Fri Jul 24 14:48:41.249415 2020] [:error] [pid 16179] [client 183.83.241.2:35763] script ‘/var/www/html/remote.php’ not found or unable to stat

[Fri Jul 24 14:49:12.949405 2020] [:error] [pid 17335] [client 183.83.241.2:35776] script ‘/var/www/html/status.php’ not found or unable to stat

[Fri Jul 24 14:49:13.324344 2020] [:error] [pid 17335] [client 183.83.241.2:35776] script ‘/var/www/html/remote.php’ not found or unable to stat

[Fri Jul 24 14:49:44.932445 2020] [:error] [pid 15691] [client 183.83.241.2:35800] script ‘/var/www/html/status.php’ not found or unable to stat

[Fri Jul 24 14:49:45.303921 2020] [:error] [pid 15691] [client 183.83.241.2:35800] script ‘/var/www/html/remote.php’ not found or unable to stat

[Fri Jul 24 14:50:16.926054 2020] [:error] [pid 16143] [client 183.83.241.2:35810] script ‘/var/www/html/status.php’ not found or unable to stat

[Fri Jul 24 14:50:17.271708 2020] [:error] [pid 16143] [client 183.83.241.2:35810] script ‘/var/www/html/remote.php’ not found or unable to stat

[Fri Jul 24 14:50:48.928660 2020] [:error] [pid 17108] [client 183.83.241.2:35842] script ‘/var/www/html/status.php’ not found or unable to stat

[Fri Jul 24 14:50:49.281363 2020] [:error] [pid 17108] [client 183.83.241.2:35842] script ‘/var/www/html/remote.php’ not found or unable to stat

[Fri Jul 24 14:51:20.950767 2020] [:error] [pid 17335] [client 183.83.241.2:35862] script ‘/var/www/html/status.php’ not found or unable to stat

[Fri Jul 24 14:51:21.326396 2020] [:error] [pid 17335] [client 183.83.241.2:35862] script ‘/var/www/html/remote.php’ not found or unable to stat

Your config files states SQLite: “dbtype”: “sqlite3”,

Is this from the new install or the existing install? Could be the root of your problem, using SQLite but thinking you are using MariaDB.

2 Likes

The db type sqlite is from my existing installation which is currently live which users are using i want to import the database to my new installation how can i do that how can import my sqlite db to my current db can you help me ton solve this

My current db is mariaDb

So you are upgrading owncloud and converting database in one step. My advice is not to do that, never do 2 things in one go.

Follow the SQLite instructions for both backup and restore in the links provided to you previously by cortho.

Finish the upgrade using SQLite and confirm all is working.

Then and only then would I carry out the database conversion to MariaDB or MySQL: https://doc.owncloud.com/server/admin_manual/configuration/database/db_conversion.html

2 Likes

i am using in different machine i am not going to upgrade in a single server machine which means i am not going to upgrade the existing owncloud so i have taken a backup of data and DB file from existing owncloud 10.0.7 and i want to import the data and db file to new owncloud installation 10.4.1 which is in different machine and my current db is mariadb

I understand that, it doesn’t change the advice.

1 Like

You will have to copy your SQLite DB over, do the upgrade and then the DB conversion (or first DB conversion and then upgrade). It will never work in a single step.

1 Like

May I know how to convert

The link in the ownCloud documentation to the relevant document was already provided to you earlier :wink:

1 Like

An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occ urred in driver: could not find driver in /var/www/html/owncloud/lib/private/DB/ Connection.php:62
Stack trace:
#0 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connectio n.php(1042): OC\DB\Connection->connect()
#1 /var/www/html/owncloud/lib/private/DB/Connection.php(207): Doctrine\DBAL\Conn ection->executeUpdate(‘PRAGMA read_unc…’, Array, Array)
#2 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connectio n.php(685): OC\DB\Connection->executeUpdate(‘PRAGMA read_unc…’)
#3 /var/www/html/owncloud/lib/private/DB/Connection.php(144): Doctrine\DBAL\Conn ection->setTransactionIsolation(2)
#4 /var/www/html/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverMan ager.php(195): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\ PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\E ventManager))
#5 /var/www/html/owncloud/lib/private/DB/ConnectionFactory.php(136): Doctrine\DB AL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Obje ct(Doctrine\Common\EventManager))
#6 /var/www/html/owncloud/lib/private/Server.php(533): OC\DB\ConnectionFactory-> getConnection(‘sqlite3’, Array)
#7 /var/www/html/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(11 8): OC\Server->OC{closure}(Object(OC\Server))
#8 /var/www/html/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(1 08): Pimple\Container->offsetGet(‘DatabaseConnect…’)
#9 /var/www/html/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\U tility\SimpleContainer->query(‘DatabaseConnect…’)
#10 /var/www/html/owncloud/lib/private/Server.php(1221): OC\ServerContainer->que ry(‘DatabaseConnect…’)
#11 /var/www/html/owncloud/lib/private/Server.php(407): OC\Server->getDatabaseCo nnection()
#12 /var/www/html/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(1 18): OC\Server->OC{closure}(Object(OC\Server))
#13 /var/www/html/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php( 108): Pimple\Container->offsetGet(‘AppConfig’)
#14 /var/www/html/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\ Utility\SimpleContainer->query(‘AppConfig’)
#15 /var/www/html/owncloud/lib/private/Server.php(1151): OC\ServerContainer->que ry(‘AppConfig’)
#16 /var/www/html/owncloud/lib/private/Server.php(588): OC\Server->getAppConfig( )
#17 /var/www/html/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(1 18): OC\Server->OC{closure}(Object(OC\Server))
#18 /var/www/html/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php( 108): Pimple\Container->offsetGet(‘AppManager’)
#19 /var/www/html/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\ Utility\SimpleContainer->query(‘AppManager’)
#20 /var/www/html/owncloud/lib/private/Server.php(1419): OC\ServerContainer->que ry(‘AppManager’)
#21 /var/www/html/owncloud/lib/private/legacy/app.php(343): OC\Server->getAppMan ager()
#22 /var/www/html/owncloud/lib/private/legacy/app.php(107): OC_App::getEnabledAp ps()
#23 /var/www/html/owncloud/lib/base.php(585): OC_App::loadApps(Array)
#24 /var/www/html/owncloud/lib/base.php(1059): OC::init()
#25 /var/www/html/owncloud/console.php(74): require_once(’/var/www/html/o…’)
#26 /var/www/html/owncloud/occ(11): require_once(’/var/www/html/o…’)

Do you have the required PHP modules for (My)SQL(ite) connections installed and enabled:
dpkg -l | grep php (Debian/Ubuntu)
or on CentOS/RHEL
yum list installed | grep php

1 Like