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

Restoring backup doesnt work #780

Closed
LukasWerfel opened this issue Jan 18, 2019 · 12 comments
Closed

Restoring backup doesnt work #780

LukasWerfel opened this issue Jan 18, 2019 · 12 comments

Comments

@LukasWerfel
Copy link

I am using docker and I want to restore a backup as described here.

But I get the error message:

Can only restore from ext/btrfs filesystems

Not sure what I am doing wrong.

@ovpc
Copy link
Collaborator

ovpc commented Jan 18, 2019

Hi @LukasWerfel, thanks for reporting,
but would you please use the forum for questions and getting help. Thank you for including ncp-report (thru pastbin or similar).

@LukasWerfel
Copy link
Author

LukasWerfel commented Jan 24, 2019

Thanks, but I moved on to another solution, since flaky backup is unfortunately a deal breaker for my requirements. Even though everything else works great!

@facorazza
Copy link

Is there a solution to this? I'm trying to restore a database from a raspberry image to a docker image but I get the same error message.

@azurefreecovid
Copy link

Me too! Inside a Docker volume that is running on an XFS file system. I'd really like a solution to this, even if it is a manual one at the moment

@facorazza
Copy link

I was able to make it work by moving the backup file inside /var/www/nextcloud/data but I wasn't able to successfully restore it due to another error. I ended up restoring everything following the docs on nextcloud and it kinda worked

@azurefreecovid
Copy link

Thanks for letting me know and glad you got it sorted.

I'm in the process of trying a restore using a modified version of nc-restore where I just commented out the line that does the ext/btrfs file system check

grep -q -e ext -e btrfs <( stat -fc%T "$TMPDIR" ) || { echo "Can only restore from ext/btrfs filesystems"     >&2; exit 1; }

To be honest I'm not exactly clear why the check is there.

I'll post back here if it turns out to be successful (or not).

@aleistah
Copy link

aleistah commented Apr 5, 2021

I'm in the process of trying a restore using a modified version of nc-restore where I just commented out the line that does the ext/btrfs file system check

To be honest I'm not exactly clear why the check is there.

Tried that and found out, that restoring is impossible since the file has not been chown.
I did the following:

  1. remove ext/btrfs file system check in ncp-backup as suggested by User:azurefreecovid to save backup on remote nfs share
  2. in case of restoring copy the Backup file to local folder on nextcloudpi
  3. " chown :www-data" the backup file before restoring
  4. restore the smoothly prepared backup file in nextcloudpi panel

worked like a charm when i just tried that.
Screenshot_3
Screenshot_1

@fl0f
Copy link

fl0f commented Jul 19, 2023

Hi,

restoring from nextcloud 26 to 25 on nextcloudpi 1.52.1 on a Debian Raspi

I found that commenting the line ([[ "$(stat -fc%T "${BASEDIR}")" =~ ext|btrfs|zfs ]] || { echo "Can only restore from ext/btrfs/zfs filesystems (found '$(stat -fc%T "${TMPDIR}")" >&2; exit 1; }) in the /usr/local/bin/ncp-restore file let the process run peacefully.

Unfortunately datat path was not backed up in this backup I I am still trying to find where my data has gone...

@fl0f
Copy link

fl0f commented Jul 19, 2023

My files were backed up in /var/www/recovery/ncp-data.xxxxx directory. I moved them manually into the /var/www/nextcloud/data directory and performed nc-fix-permissions and nc-scan.

I recovered everything

The fact is that I tried to upgrade NC to version 26 from a php 7.4 debian based Raspi 4. At the end of the upgrade, the console stated that NC 26 requires php 8 + and tried to restore from backup. Then I got stuck by this filesystem check (see previous posts) and the restoration of the backup failed stating "Rollback failed! Data left at /var/www/recovery/ncp-data.f8NCny". This is the location where my files where stored for the upgrade. Then When I commented the filesystem check line in the ncp-restore script, the restoration was sucessful but my files where still in the recovery directory. The restore script performed a scan that erased all data from the database because the /var/www/nextcloud/data directory was then empty.

In fact my file system is ext4. Maybe in future versions this filesystem check could include ext4 filesystems so that the automatic restore performed by the updater works !

@theCalcaholic
Copy link
Collaborator

theCalcaholic commented Jul 20, 2023

@fl0f You encountered a bug with ncp-restore that has been fixed in the latest release. ext4 is of course supported (as well as btrfs and now zfs), but the bug would have affected any of these file systems.

@fl0f
Copy link

fl0f commented Jul 21, 2023

Hi @theCalcaholic and thank you for your reply.
Could you tell me what the latest nextcloudpi version is because I thought I had the latest currently running (1.52.1).

Thanks !

@theCalcaholic
Copy link
Collaborator

Hi @theCalcaholic and thank you for your reply.
Could you tell me what the latest nextcloudpi version is because I thought I had the latest currently running (1.52.1).

Thanks !

The latest version is v1.52.2 (see https://github.com/nextcloud/nextcloudpi/releases/tag/v1.52.2)

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

No branches or pull requests

8 participants