syncloud / platform

Run popular services on your device with one click
https://syncloud.org
GNU General Public License v3.0
400 stars 40 forks source link

Syncloud Backup - Can't restore on new build #394

Closed chegeiser closed 5 years ago

chegeiser commented 5 years ago

I was not able to get my old Nextcloud and Notes files to transfer over by restoring from a backup using the new backup feature. This was a fresh install of Syncloud that I plugged the old HD into, enabled the external drive, and then used the restore feature. I still could not access the old data from the original Nextcloud and Notes install that are on this HD.

cyberb commented 5 years ago

Can you send us logs (Settings - Support) after the backup restore attempt?

chegeiser commented 5 years ago

I'll have to start with a fresh run - I am running the old Pi system right now. A couple questions so I'm sure I am using the Backup feature correctly: Per the directions in the wiki:

Currently you can backup app settings from App page and restore an app using Settings - Backup page.

Backup is stored on a device file storage which located at /data/platform/backup

Device file storage (/data) is located either on an internal disk or on an external disk (if it was activated in Settings - Storage)

So this means?

  1. Backup the current system (Raspberry Pi)
  2. Boot from fresh image on new device (Odroid N2)
  3. Activate the new device
  4. Activate the external disk on the new device so the backup is available
  5. Restore from the backup on the external disk
  6. All data from the original device is now available on the new device
cyberb commented 5 years ago

Yes, it should work like this.

chegeiser commented 5 years ago

Just installed form image, activated to my custom domain, activated external disk, updated system and installer, and restored from backup. No luck - there was a little popup in the top right of the screen that said the restore was finished but no apps are available. I've sent logs.

I also rebooted and checked - still no apps that were installed on the original system.

cyberb commented 5 years ago

Sorry, you need to install apps first. Backup does not contain app itself

cyberb commented 5 years ago

We should add a warning when restoring backup of not installed app.

chegeiser commented 5 years ago

That worked. Install app, then restore backup.

But there is another problem that may be related. Once I restored my Nextcloud backup I cannot install other apps. I can choose Install (Diaspora and Syncthing tried) and it shows that it is installing - then after a short period it goes back to just showing the Install option and the app is not installed.

Logs sent.

I also tried installing Wordpress, which had never been installed - this install also failed. Otherwise Nextcloud and Notes are working fine - they were installed prior to restoring the backup.

cyberb commented 5 years ago

Could you install one more time wait few minutes and send logs right after that?

chegeiser commented 5 years ago

Install from image, then install apps, then logs? Or also install from backup after image>apps?

cyberb commented 5 years ago

I mean whatever you have right now, you cannot install new apps right? I just cannot see anything related to app install error. If you install an app which fails to install and send logs right aeay I will probably see something useful in them.

chegeiser commented 5 years ago

Done. Just tried to install File Browser - it appeared to be installing, then didn't. Logs sent.

chegeiser commented 5 years ago

Same thing with Syncthing. Logs sent.

Pic attached showing Syncthing installing, then it's back to the default page with the Install button. Syncthing Syncthing after install attempt

cyberb commented 5 years ago

You have only 700m left on your sd card (boot disk) which is 3g. You need to extend it to take all 16g from settings - storage. Try that to see if it helps.

chegeiser commented 5 years ago

I expanded the file system and tried to install Diaspora. Still no luck. Logs sent.

Also, when I tried to reboot from the Syncloud boot menu it rebooted. But my apps were not available. They didn’t show up in the apps section. I had to shut down, unplug the device, plug it back in and reboot which restored the apps. Still no Diaspora.

Also just realized that though the apps show up after rebooting (after power cycle), they end up giving me a 502 Bad Gateway page.

cyberb commented 5 years ago

Cannyou run the following command uaing ssh on the device and post the output:

snap install diaspora
chegeiser commented 5 years ago

I get this error:

error: cannot perform the following tasks:

  • Mount snap "diaspora" (180924) (exit status 127)
cyberb commented 5 years ago

This may be an sd card issue. Can you try all this a new sd card? Do not forget to extend it first.

chegeiser commented 5 years ago

Here are screenshots showing that Nextcloud shows up as installed when I select it from the App Center, but then in Apps it is missing - no apps at all in Apps though I had Nextcloud and Notes running prior to a restart. syncloud apps image

chegeiser commented 5 years ago

I'll try a new SD card (eMMC). Thanks!

chegeiser commented 5 years ago

I just installed from a new SD card - same result. Logs sent right after trying to install Diaspora.

cyberb commented 5 years ago

Ok, could you check settings - updates and upgrade installer if there is an update?

I have just pushed an updated installer with timeout fix which may or may not fix the problem.

chegeiser commented 5 years ago

That seemed to get the installer to work correctly. I installed a fresh image and then expanded the filesystem, then updated, then added two apps, restored backups and added more apps. That all worked with Diaspora, and File explorer - but Syncthing and Gogs will not install. Logs sent.

But after about 6 hours the SSL cert still hasn't gone through on my custom domain. Every other time I've done this the https site has been up and running with a trusted cert within 15-60 minutes. Any idea if any other changes were made that could have impacted the certificate handling? Could the first issue with Gogs and Syncthing be related to the fact there's no valid certificate?

cyberb commented 5 years ago

I think you are hittinh the rate limit because of testing.

Logs says: There were too many requests of a given type :: Error creating new order :: too many certificates already issued for exact set of domains

It should be 5 or 50 per week: https://letsencrypt.org/docs/rate-limits/

cyberb commented 5 years ago

Gogs is actually broken at the moment, I am fixong it. Syncthing I will check. Certificate should not affect installation.

chegeiser commented 5 years ago

hmmm... 20 hours later and the certificate still is invalid.

cyberb commented 5 years ago

I guess your cerrificate is OK now? Gogs is fixed also, please install again. Syncthing is being fixed and will be ready in couple of days.

cyberb commented 5 years ago

Syncthing is also fixed now, sorry for the inconvenience. Could you check?

chegeiser commented 5 years ago

Syncthing is now working. All seems to work: backups, restoring from backup, Syncthing, GOGS, Nextcloud, Notes, File browser, Diaspora.