Trouble moving OC installation to new server


Please excuse me if this is the wrong forum and/or if the post is wrongly formatted, but anyway..

I am trying to move my current owncloud deployment to a new server;

Turn of apache, dump database, rsync over everything to the new server that has the same packages installed.

When I then try to access the new server, I get this in the logs:

{"reqId":"Trv3qFWklRAe4X7gV2qR","level":3,"time":"2018-05-09T08:52:55+02:00","remoteAddr":"","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"file_get_contents(/var/www/owncloud/core/js/core.json): failed to open stream: No such file or directory at /var/www/owncloud/lib/private/legacy/template.php#155"}
{"reqId":"Trv3qFWklRAe4X7gV2qR","level":3,"time":"2018-05-09T08:52:55+02:00","remoteAddr":"","user":"--","app":"core","method":"GET","url":"/index.php","message":"Exception: {"Exception":"Exception","Message":"File not found: /var/www/owncloud/core/shipped.json","Code":0,"Trace":"
#0 /var/www/owncloud/lib/private/App/AppManager.php(379): OC\App\AppManager->loadShippedJson()
#1 /var/www/owncloud/lib/private/App/AppManager.php(108): OC\App\AppManager->getAlwaysEnabledApps()
#2 /var/www/owncloud/lib/private/App/AppManager.php(127): OC\App\AppManager->getInstalledAppsValues()
#3 /var/www/owncloud/lib/private/legacy/app.php(351): OC\App\AppManager->getInstalledApps()
#4 /var/www/owncloud/lib/private/legacy/app.php(111): OC_App::getEnabledApps()
#5 /var/www/owncloud/lib/base.php(579): OC_App::loadApps(Array)
#6 /var/www/owncloud/lib/base.php(1014): OC::init()
#7 /var/www/owncloud/index.php(54): require_once('/var/www/ownclo...')
#8 {main}","File":"/var/www/owncloud/lib/private/App/AppManager.php","Line":367}"}
{"reqId":"Trv3qFWklRAe4X7gV2qR","level":3,"time":"2018-05-09T08:52:55+02:00","remoteAddr":"","user":"--","app":"core","method":"GET","url":"/index.php","message":"Exception: {"Exception":"Exception","Message":"Cannot read core/js/core.json","Code":0,"Trace":"
#0 /var/www/owncloud/lib/private/legacy/template.php(81): OC_Template::initTemplateEngine('error')
#1 /var/www/owncloud/lib/private/legacy/template.php(358): OC_Template->__construct('', 'exception', 'error', false)
#2 /var/www/owncloud/index.php(84): OC_Template::printExceptionErrorPage(Object(Exception))
#3 {main}","File":"/var/www/owncloud/lib/private/legacy/template.php","Line":164}"}

Any pointers?



can you give more info about your setup?

OC version would be a good start

Yes, sorry about that!

ownCloud 10.0.4 (production)

Installed packages:

php7.0 php7.0-curl php7.0-imap php7.0-ldap php7.0-mysql php7.0-readline php7.0-zip php7.2-ldap php-common php-ldap php-redis
php7.0-cli php7.0-fpm php7.0-intl php7.0-mbstring php7.0-opcache php7.0-sqlite3 php7.2-common php-apcu php-igbinary php-memcached
php7.0-common php7.0-gd php7.0-json php7.0-mcrypy php7.0-pgsql php7.0-xml php7.2-imap php-apcu-bc php-imap php-msgpack
mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 redis-server redis-tools memcached


$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'orjsrjsrjsrjsrjh',
  'passwordsalt' => 'Hrjsrjrjr/S',
  'secret' => 'rsjrjrtjtjstrjnrj',
  'trusted_domains' =>
  array (
    0 => 'owncloud.**.se',
  'datadirectory' => '/var/www/owncloud/data',
  'trashbin_retention_obligation' => '30 days',
  'overwrite.cli.url' => '',
  'quota_include_external_storage' => true,
  'trashbin_retention_obligation' => 'auto',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'PASSWORD',
  'logtimezone' => 'Europe/Berlin',
  'installed' => true,
  'mail_from_address' => 'owncloud',
  'mail_smtpmode' => 'php',
  'mail_domain' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  'maintenance' => false,
  'loglevel' => 0,
  'theme' => '',
  'user_backends' =>
  array (
    0 =>
    array (
      'class' => 'OC_User_IMAP',
      'arguments' =>
      array (
        0 => '{emailserver:993/imap/ssl/novalidate-cert}',
  'ldapIgnoreNamingRules' => false,

Can you make sure the new migrated files have the correct permissions?



Exact same permissions as the working environment.
The user is www-data, like the working environment.

Okay - stupid question - can't you just copy the missing files from the old installation to the new one?

Sorry but I am all out of Ideas :slight_smile:

1 Like

Probably bevor copying them, are those files really missing?

1 Like

Should not rsync take care of that?
rsync -Chavz remoteserver:/path/to/catalogue /path/to/local

I will try doing it again, have done it many times before

Oh shit,,, I am the one who is stupid....
rsync -av should be used instead.... dont know why

Probably is faster if you copy the tar file and the config.php, and then untar and put the config.php in that folder

It is pretty hard to tar down a 9TB installation :slight_smile:

rsync -av did solve it!