Hello,
I am currently running Nextcloud in AWS EC2 with S3 as primary storage. I’d like to move it to a home server using local storage, primarily to save on cost.
What’s the best approach to migrate the data?
I’ve tried to sync the content of the S3 bucket to local storage using the aws s3 sync
command, but apparently Nextcloud doesn’t organize bucket files the same way as the local storage.
% ls -ltr /data/nextcloud|tail
-rw-r--r-- 1 www www 139394 Apr 12 14:08 urn:oid:177499
-rw-r--r-- 1 www www 551 Apr 12 14:08 urn:oid:177506
-rw-r--r-- 1 www www 191 Apr 12 14:08 urn:oid:177505
Thanks!
Paul
Nextcloud version (eg, 12.0.2): 18.0.3
Operating system and version (eg, Ubuntu 17.04): Debian 10 (Buster)
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.38
PHP version (eg, 7.1): 7.3
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => '_redacted_',
'passwordsalt' => '_redacted_',
'secret' => '_redacted_',
'trusted_domains' =>
array (
0 => '_redacted_',
),
'datadirectory' => '/var/www/nextcloud/data',
'overwrite.cli.url' => '_redacted_',
'dbtype' => 'pgsql',
'version' => '18.0.3.0',
'dbname' => '_redacted_a',
'dbhost' => '_redacted_',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '_redacted_',
'dbpassword' => '_redacted_',
'installed' => true,
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'log_type' => 'owncloud',
'logfile' => '/var/log/nextcloud.log',
'loglevel' => 0,
'objectstore' =>
array (
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' =>
array (
'bucket' => '_redacted_',
'autocreate' => true,
'key' => '_redacted_',
'secret' => '_redacted_',
'region' => 'eu-west-1',
'use_path_style' => false,
),
),
'maintenance' => false,
'theme' => '',
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
),
'mail_smtpmode' => 'smtp',
'mail_smtphost' => '_redacted_',
'htaccess.RewriteBase' => '/nextcloud',
);