Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to restore NCP instance backup with ncp-restore #1883

Open
OfficialMuffin opened this issue Mar 13, 2024 · 0 comments
Open

Unable to restore NCP instance backup with ncp-restore #1883

OfficialMuffin opened this issue Mar 13, 2024 · 0 comments

Comments

@OfficialMuffin
Copy link

OfficialMuffin commented Mar 13, 2024

On a fresh installation of v1.53.1, I am trying to recover my nextcloudpi instance but I run into an error:

[ nc-restore ] (Wed Mar 13 19:53:22 GMT 2024)
check free space...
extracting backup file /home/nick/nextcloud-bkp_20240301_1709251203.tar.gz...
restore files...
DATA CONFLICT! Your old '/var/www/nextcloud/data' directory can be found in '/var/www/nextcloud/.data_2024-03-13T1710359621' after the restore script is done. The new '/var/www/nextcloud/data' directory will be restored from the backup. You can manually merge these directories with this command (run nc-fix-permissions and nc-scan afterwards): cp -rn '/var/www/nextcloud/.data_2024-03-13T1710359621/'* '/var/www/nextcloud/.data_2024-03-13T1710359621/'.[!.]* '/var/www/nextcloud/data/'
Restoring old '/var/www/nextcloud/data' to '/var/www/nextcloud/.data_2024-03-13T1710359621'...
restore database...
ERROR 1062 (23000) at line 2638: Duplicate entry '2-f98fa29f95a6e9ba8c7a1bdfd8054a51' for key 'fs_storage_path_hash'
Error restoring nextcloud database
Cleanup...

System information

NextcloudPi diagnostics

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
grep: /etc/apache2/sites-available/nextcloud.conf: No such file or directory
NextcloudPi version  v1.53.1
NextcloudPi image    NextcloudPi_RaspberryPi_v1.53.1.img
OS                   Debian GNU/Linux 11. 5.15.61-v8+ (aarch64)
automount            no
USB devices          sda
datadir              /var/www/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      4.5G/110G
rootfs usage         4.5G/110G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    27.1.7.2
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
Public IPv4          ***REMOVED SENSITIVE VALUE***
Public IPv6          ***REMOVED SENSITIVE VALUE***
Port 80              closed
Port 443             closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              ***REMOVED SENSITIVE VALUE***
Interface            wlan0
Certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               45min

Nextcloud configuration

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "next",
            "1": "192.168.1.130",
            "14": "next",
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "27.1.6.2",
        "overwrite.cli.url": "https:\/\/next\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/var\/www\/nextcloud\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "default_phone_region": "GB",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "loglevel": "2",
        "log_type": "file",
        "maintenance": true,
        "mail_sendmailmode": "smtp",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "Users",
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "logfile": "\/var\/www\/nextcloud\/data\/nextcloud.log",
        "data-fingerprint": "af4d54d3679aa4562196dde93e015500",
        "ncd_admin_settings": {
            "ncd_disable_bt": "1"
        },
        "theme": "",
        "app_install_overwrite": [
            "duplicatefinder",
            "keeporsweep"
        ]
    }
}

HTTPd logs

[Wed Mar 13 19:42:14.999124 2024] [authnz_external:error] [pid 39514:tid 547780280704] [remote 192.168.1.176:38554] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:14.999249 2024] [auth_basic:error] [pid 39514:tid 547780280704] [remote 192.168.1.176:38554] AH01617: user ncp: authentication failure for "/img/loading-small.gif": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.001214 2024] [authnz_external:error] [pid 39514:tid 547805507968] [remote 192.168.1.176:38554] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.001300 2024] [auth_basic:error] [pid 39514:tid 547805507968] [remote 192.168.1.176:38554] AH01617: user ncp: authentication failure for "/js/ncp.js": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.017178 2024] [authnz_external:error] [pid 39514:tid 547813917056] [remote 192.168.1.176:38554] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.017261 2024] [auth_basic:error] [pid 39514:tid 547813917056] [remote 192.168.1.176:38554] AH01617: user ncp: authentication failure for "/js/minified.js": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.077155 2024] [authnz_external:error] [pid 39514:tid 547788689792] [remote 192.168.1.176:38554] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.077267 2024] [auth_basic:error] [pid 39514:tid 547788689792] [remote 192.168.1.176:38554] AH01617: user ncp: authentication failure for "/img/ncp-logo.svg": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.097683 2024] [authnz_external:error] [pid 39514:tid 547797098880] [remote 192.168.1.176:38554] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:15.097765 2024] [auth_basic:error] [pid 39514:tid 547797098880] [remote 192.168.1.176:38554] AH01617: user ncp: authentication failure for "/css/ncp.css": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.870255 2024] [authnz_external:error] [pid 38918:tid 547898007936] [remote 192.168.1.176:38555] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.870373 2024] [auth_basic:error] [pid 38918:tid 547898007936] [remote 192.168.1.176:38555] AH01617: user ncp: authentication failure for "/img/ncp-logo.svg": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.891878 2024] [authnz_external:error] [pid 38918:tid 547889598848] [remote 192.168.1.176:38555] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.891983 2024] [auth_basic:error] [pid 38918:tid 547889598848] [remote 192.168.1.176:38555] AH01617: user ncp: authentication failure for "/css/ncp.css": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.951539 2024] [authnz_external:error] [pid 38918:tid 547923202432] [remote 192.168.1.176:38555] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.951624 2024] [auth_basic:error] [pid 38918:tid 547923202432] [remote 192.168.1.176:38555] AH01617: user ncp: authentication failure for "/js/ncp.js": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.954338 2024] [authnz_external:error] [pid 38918:tid 547906417024] [remote 192.168.1.176:38555] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.954403 2024] [auth_basic:error] [pid 38918:tid 547906417024] [remote 192.168.1.176:38555] AH01617: user ncp: authentication failure for "/js/minified.js": Password Mismatch, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.957166 2024] [authnz_external:error] [pid 38918:tid 547729826176] [remote 192.168.1.176:38555] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp, referer: https://192.168.1.184:4443/
[Wed Mar 13 19:42:26.957241 2024] [auth_basic:error] [pid 38918:tid 547729826176] [remote 192.168.1.176:38555] AH01617: user ncp: authentication failure for "/img/loading-small.gif": Password Mismatch, referer: https://192.168.1.184:4443/

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"T1EhTuG68S4gdtToxzUm","level":2,"time":"2024-03-13T19:55:01+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"ZMGwQrzPnXvrtZJ2cujC","level":2,"time":"2024-03-13T20:00:01+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"ha7iOvmX7UIVoFTrQ7LQ","level":2,"time":"2024-03-13T20:05:02+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"CzwFtwdrgyaCuSFRZ9eA","level":2,"time":"2024-03-13T20:10:01+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"TDA0fSdUEePaNvHqKx8n","level":2,"time":"2024-03-13T20:15:02+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"QXmiF2kEMZTJoxcZMh7D","level":2,"time":"2024-03-13T20:17:44+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"3SVgjppfed38K1xYs4hS","level":2,"time":"2024-03-13T20:17:46+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"VK91fN5KpSqNYcKo6jI4","level":2,"time":"2024-03-13T20:17:47+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}
{"reqId":"9zHQlHFgIsmEpj0r8MGy","level":2,"time":"2024-03-13T20:17:52+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /var/www/nextcloud/data/tmp is not present or writable","userAgent":"--","version":"27.1.6.2","data":[]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant