Support intro
Sorry to hear you’re facing problems
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 12.0.2): 14.0.3
Operating system and version (eg, Ubuntu 17.04): Gentoo Linux (was Adélie Linux)
Apache or nginx version (eg, Apache 2.4.25): lighttpd 1.4.52
PHP version (eg, 7.1): 7.2.19
The issue you are facing:
I followed the documentation to create a backup, including the data dir and the database. I left the existing data in place, just to see if it would work when I switched OSes.
The thing is, Gentoo stores NC files in a different way than Adélie did. It’s organized for vhosts, which I don’t use. So, I worked around this by changing the docroot to /usr/share/webapps/nextcloud/14.0.3/htdocs
, and Nextcloud mostly worked!
However, when I check logs, I see paths that don’t exist. Kind of expected due to the difference in OSes, but I’m not sure of the best way to proceed.
To clarify, I have NOT moved the data dir or app data. I intend to keep those in place. They are in /var/lib/nextcloud
What I’m thinking is there are two solutions: one is to dive directly into the database using pgadmin and correct the paths myself. I could probably do this in a few hours, depending on how poorly paths are managed internally. I was mistaken: it appears that no (or very few) absolute paths are present in the database.
The other solution is the one that’s typically peddled, “Reinstall”. However, if I reinstall, it will produce a different instance ID, and the backup DB won’t be able to be grafted onto that because there isn’t a tool to migrate or correct paths in a DB backup. Again, no real paths in the database; the occ
tool gets commands added to it to aid migration as needed. I’ve spent considerable time setting up NC on the prior install, and the point of a backup is to be able to restore it.
How can I restore this backup on a different (but similar) OS, getting the same instance ID, the same share link IDs, and so on? I’m sure businesses are able to pull this off, so an individual should, too.
Is this the first time you’ve seen this error? (Y/N): n/a
Steps to replicate it:
- Follow the docs to do a backup
- Install the same NC version on a different OS
- Restore the backup
- Watch as some icons don’t show up, some scripts don’t trigger, and errors get spat out to the log. Most of NC works despite these errors, though.
The output of your Nextcloud log in Admin > Logging:
(I don’t think this is relevant since I’ve already explained the situation, but here ya go)
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-27T09:15:20-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-27T09:15:20-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-27T09:15:19-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-27T09:15:19-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-27T09:15:18-0700
Error ResourceLocator can not find a web root (root: /var/lib/nextcloud/appstore/contacts, file: css/contacts/c925-7a27-style.css?v=2e20e2a4ee0070cb8198097823bcfcd4, webRoot: , throw: true) 2019-07-25T21:33:39-0700
Error ResourceLocator can not find a web root (root: /var/lib/nextcloud/appstore/contacts, file: css/contacts/c925-7a27-style.css?v=2e20e2a4ee0070cb8198097823bcfcd4, webRoot: , throw: true) 2019-07-25T21:22:02-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:20:44-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:20:44-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:20:43-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:20:43-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:20:32-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:05:32-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:05:32-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:05:32-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:05:31-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:05:31-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:05:31-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:05:28-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:03:38-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:03:37-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:03:37-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:03:36-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:03:36-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:03:36-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:03:36-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:03:35-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T21:03:35-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T21:03:34-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T20:56:25-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T20:56:25-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T20:56:25-0700
Error Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_backupcodes" WHERE "user_id" = ?' with params ["zlg"]: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "oc_twofactor_backupcodes" does not exist LINE 1: SELECT "id", "user_id", "code", "used" FROM "oc_twofactor_ba... ^ 2019-07-25T20:56:24-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T20:56:17-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T20:56:16-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T20:56:16-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T20:56:16-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T20:56:14-0700
Error Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0 2019-07-25T20:51:19-0700
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'datadirectory' => '/var/lib/nextcloud/data',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/share/webapps/nextcloud/14.0.3/htdocs/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/lib/nextcloud/appstore',
'url' => '/appstore',
'writable' => true,
),
),
'updatechecker' => false,
'check_for_working_htaccess' => false,
'htaccess.IgnoreFrontController' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'installed' => true,
'instanceid' => 'ocoduo86ciwx',
'passwordsalt' => 'REDACTED',
'secret' => 'REDACTED',
'trusted_domains' =>
array (
0 => 'files.zlg.space',
),
'dbtype' => 'pgsql',
'version' => '14.0.3.0',
'overwrite.cli.url' => 'https://files.zlg.space',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:5432',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => 'REDACTED',
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_from_address' => 'REDACTED',
'mail_domain' => 'zlg.space',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'REDACTED',
'mail_smtpport' => '465',
'mail_smtpname' => 'REDACTED',
'mail_smtppassword' => 'REDACTED',
'maintenance' => false,
'data-fingerprint' => 'REDACTED',
);
(For reference, Adélie installs Nextcloud to /usr/share/webapps/nextcloud
without version info since it’s a binary distro)
The output of your Apache/nginx/system log in /var/log/____
:
Irrelevant here again since it’s the webserver and that part’s working fine. I could not find an error log for lighttpd (indicating that it hasn’t written one yet). /var/log/php-fpm.log
contains no errors related to the nextcloud pool, too. This is squarely a NC internal thing.
For reference, here’s the top two levels of files for NC, as installed by Gentoo:
/usr/share/webapps/nextcloud/14.0.3 # tree -L 2
.
├── conf
├── config-files
├── hooks
├── hostroot
│ ├── cgi-bin
│ ├── error
│ └── icons
├── htdocs
│ ├── 3rdparty
│ ├── AUTHORS
│ ├── COPYING
│ ├── apps
│ ├── config
│ ├── console.php
│ ├── core
│ ├── cron.php
│ ├── data -> /var/lib/nextcloud/data/
│ ├── data-default
│ ├── index.html
│ ├── index.php
│ ├── lib
│ ├── occ
│ ├── ocm-provider
│ ├── ocs
│ ├── ocs-provider
│ ├── public.php
│ ├── remote.php
│ ├── resources
│ ├── robots.txt
│ ├── settings
│ ├── status.php
│ ├── themes
│ ├── updater
│ └── version.php
├── installed_by_webapp_eclass
├── server-owned-files
└── sqlscripts
22 directories, 15 files
(I moved the existing ‘data’ dir to data-default and symlinked data to /var/lib/nextcloud/data
. It works.)
Thank you for any assistance you can offer. It’s becoming frustrating trying to maintain a restorable backup for NC.
EDIT: Advanced instructions are totally fine. I’m not afraid to get my hands dirty In the mean time, I’m exploring NC’s database via pgadmin. So far I haven’t run into any paths yet. I’ll update this thread again if I find a solution.
EDIT2: I’ve crossed out some info that was wrong.