If you know about NGINX and servers, Webinoly is for you!
0 votes
49 views
by Talented
I found instructions on how to restore a backup to the same server it was made from. But I want to test restoring a backup on a different server to simulate total loss of the original host. I saved the profile directory (in the .duply directory) but I haven't been able to figure out how to set up that profile on another machine. I have another host that has webinoly already installed and I tried to add a profile, but I only see a way to add S3 credentials (where are these stored?). Thanks

1 Answer

+1 vote
by Expert
A backup can be restored in a different server the same way, just create a profile with the same data (or a copy of the original profile). You can even use the same S3 credentials from the first server or you can use another pair of credentials if you want.

Or even better, you can use an IAM role as is described in the docs.
by Talented
I'll be trying this soon. Can you please tell me where S3 credentials are stored once they are configured?
by Expert

Here: $HOME/.aws/credentials

by Talented

I built a new Hetzner Cloud Ubuntu 20 server, installed Webinoly, copied the .aws and .duply folders over to it, and then tried

root@ubuntu-2gb-nbg1-2:~# webinoly -backup=s3 -restore=/var/www/xxx

and got this error:

Start duply v2.2, time is 2020-07-26 22:22:25.
Using profile '/root/.duply/webh2-all-sites'.
WARNING:
The profile's folder
'/root/.duply/webh2-all-sites'
permissions are not safe (drwxr-xr-x). Secure them now. - (OK)
Using installed duplicity version 0.8.12, python 3.8.2 (/usr/bin/python3), gpg 2.2.19 (Home: /root/.gnupg), awk 'GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)', grep 'grep (GNU grep) 3.4', bash '5.0.16(1)-release (x86_64-pc-linux-gnu)'.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - En/Decryption skipped. (GPG disabled)
--- Start running command RESTORE at 22:22:26.337 ---
BackendException: Could not initialize backend: No module named 'boto'
22:22:26.981 Task 'RESTORE' failed with exit code '23'.
--- Finished state FAILED 'code 23' at 22:22:26.981 - Runtime 00:00:00.643 ---

Should I be installing boto as indicated?

by Expert
Tell me at least three things you tried in order to solve it before asking for help.

If you just come here and ask everything you see, this will take ages.
by Talented
edited by

I come here to post these things because I my intention is to help you and other users as well. I would have thought everything needed to restore with duply and duplicity would already be installed by Webinoly, and felt like something might be wrong with the installer. I will just go ahead and try installing boto. I definitely don't want to inconvenience you or anyone else.

EDIT:

I did the following, which worked:

apt install python3-pip
sudo pip3 install boto
by Talented

Hi again, 

I've been working on this for quite a while but so far can't restore the database properly. I've been able to restore all the files to the new server, and now I'm having trouble with importing the database. I've tried using 

sudo webinoly -db-import -file=/folder

with a database backed up using -backup=local and get a "success" message, yet search-replace doesn't work, as if the records aren't there.

Alternatively, I've tried using wp-cli to import the same backed up database, but it produces two permissions errors, and the site appears corrupted. I've tried dropping the database first and then creating a new empty one using wp-cli, and I've tried importing over the existing db (the docs don't specify whether the -db-import function drops the existing db first).

Any suggestions on where to go from here would be helpful, including some docs pages I might have missed.

Thanks

by Expert

I come here to post these things because I my intention is to help you and other users as well.

Really? Because it seems like you are who need help.

You seem totally lost, there's no so much we can do to help you if you can not even run one single command successfully. Read more and more, there's a lot of tutorials and docs you can find in Google to learn the foundations.

Just a clue: Every package you need is already installed and everything is working fine with the backup command. I use it very often!

by Talented
edited by

Update: I made a new Ubuntu 18.04 server and went through the process again from scratch, and the restore process worked perfectly, no mention of missing 'boto' module. I was able to fully download my backup, and restore a site (though I still got the same permissions warning when importing the database using wp-cli -- see below).

Then, I made another fresh Ubuntu 20.04 server and tried again. When I tried to download the backup the first time, I again got an error that the 'boto' package was missing, so i had to do what I mentioned above. Then I was able to continue with the process for a successful restore.

I tried this once again, just in case I had made a mistake, and again, missing 'boto'.

Maybe this is a problem specific to Hetzner Cloud -- I haven't tried on another host yet. Cristhian, if it would help, I can make you an instance to try.

For now, I'll just avoid Ubuntu 20.04.

More info on the db import error:

ERROR 1044 (42000) at line 22 in file: '/var/www/backup-db/webinoly-backup-db_domain.org_2020-07-27-08:30:02.sql': Access denied for user 'domain_org'@'localhost' to database 'domain_org'
ERROR 1044 (42000) at line 24 in file: '/var/www/backup-db/webinoly-backup-db_domain.org_2020-07-27-08:30:02.sql': Access denied for user 'domain_org'@'localhost' to database 'domain_org'

Lines 22 and 24 are:

22: CREATE DATABASE /*!32312 IF NOT EXISTS*/ `domain_org` /*!40100 DEFAULT CHARACTER SET utf8 */;
24: USE `domain_org`;

It must just be that the webinoly export includes the 'create' entries where the wp-cli export doesn't.

by Expert

I don't want to be rude with you, believe me.

  • Ubuntu 16.04 is not even supported by Webinoly.
  • Don't send that kind of "private" messages to my email address.
I don't know how to help you, maybe Webinoly is not the right tool for your needs.
by Talented
edited by
sorry, I meant 18.04! not 16. I edited the message. I don't need help any more -- it was just something happening with 20.04 that does not happen on 18.04. I'm glad I figured that out. Thanks again for maintaining Webinoly and making it available for us.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.

Donations

Webinoly Support Paypal Donations Webinoly Support Bitcoin Donations GitHub Sponsors

Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.

Affiliate Links

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...