Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
by Rookie

When using this command 

sudo webinoly -backup=s3 -profile=DataBackup -add-db-pre=example.com -destination=/var/www/example.com/db-backup -max=10 -bucket=america/db_com

like in the example tutorial, I get this error when using a non AWS S3 service (DigitalOcean) and running the backup:

[ERROR] Can not connect with your bucket!

So, the DB will not be sent to the S3 bucket=america/db_com.

- Incremental backups of folders are working

- I also tried to add this -s3-compatible-endpoint=

- Also it doesn't work when I try to backup the DB directly and send it to S3 using this command: sudo webinoly -backup=local -wp=example.com -destination=/folder -max=5 -bucket=bucketname/folder

Is DB backup and sending to non AWS S3 not supported?


1 Answer

0 votes
by Expert

Please, read the documentation!

  • Compatible S3 services are all supported.
  • Add-db-pre only configures a db backup in an existing profile. It doesn't run by itself. Create a new profile, then configure add-db-pre, and then run the backup. Just be sure that add-db-pre destination folder is included in your backup.
by Rookie
edited by

Thank you for your answer!

Maybe here is the confusion:

When I run a backup, it will do a DB backup first (add-db-pre) and safe it to the destination folder, which will be backuped in the backup. But I want to send the db backup into the same bucket in a separate folder. Just like you did it in the full example tutorial here.

This is what I did:

I created a new profile with: 

sudo webinoly -backup=s3 -profile=patric_itrokkz_website -bucket=itrokkz-bkp/patric_itrokkz_website -source=/var/www/patric.itrokkz.website -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com

Then I added add-db-pre:

sudo webinoly -backup=s3 -profile=patric_itrokkz_website -add-db-pre=patric.itrokkz.website -destination=/var/www/patric.itrokkz.website/db-backup -max=5 -bucket=itrokkz-bkp/database_bkp -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com

Then, I run the backup with:

sudo webinoly -backup=s3 -profile=patric_itrokkz_website -run

And I get this Error:

--- Start running command PRE at 2022-07-09 15:33:01.936 ---

Running '/root/.duply/patric_itrokkz_website/pre' - OK

Output: Backup is in process, wait...

Database local backup successfully done! (/var/www/patric.itrokkz.website/db-backup/webinoly-backup-db_patric.itrokkz.website_2022-07-09-15:33:02.sql)

[ERROR] Can not connect with your bucket!

--- Finished state OK at 2022-07-09 15:33:03.850 - Runtime 00:00:01.914 ---

The database backup was done and saved in the destination folder. But the database backup (add-db-pre) was not sent to the bucket itrokkz-bkp/database_bkp

The backup of the folder (source) was done, and I can see the files in the bucket itrokkz-bkp/patric_itrokkz_website (commands BKP, POST, VERIFY, PURGE have no errors).

So, it's just that the add-db-pre is not sending the database backup to the same bucket into a different folder.

by Expert

Check this file: /root/.duply/patric_itrokkz_website/pre

Check for any errors, typos, etc. Also, try to run the command you find inside directly from command line to see if it runs fine.

by Rookie

Thank you for your answer.

I checked the file and command for any typos. But there is everything right:

sudo webinoly -backup=local -wp=patric.itrokkz.website -destination=/var/www/patric.itrokkz.website/db-backup -max=5 -bucket=itrokkz-bkp/database_bkp

When I run the command from the command line, I still get the same error:
Database local backup successfully done! (/var/www/patric.itrokkz.website/db-backup/webinoly-backup-db_patric.itrokkz.website_2022-07-10-22:44:25.sql)
[ERROR] Can not connect with your bucket!
I then deleted the folder inside the bucket and made a new one with the same name. Still got the same error. Then I created a new folder in my bucket with a different name and run the command. Still the same error. The bucket name is right, checked it and copy/pasted it from the command I created the profile. The folder name is right too, checked it and copy/pasted it from the bucket file manager (Spaces) on DO. So, no typo there. I also deleted the profile and made a new one. Still the same error.
The cronjob with the backup profile works just fine, and I have the backups in my bucket. But only this separate database backup cannot connect to the (same) bucket and I get this error.
Is there a log file I can check?
by Expert

Seems like -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com is missing in the add-db-pre command. Try it, please!

by Rookie

I added -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com to the command:

sudo webinoly -backup=local -wp=patric.itrokkz.website -destination=/var/www/patric.itrokkz.website/db-backup -max=5 -bucket=itrokkz-bkp/database_bkp -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com
And I still got the same error:
[ERROR] Can not connect with your bucket!
I also did a new profile:
sudo webinoly -backup=s3 -profile=test -bucket=itrokkz-bkp/patric_itrokkz_website -source=/var/www/patric.itrokkz.website -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com
Then I added add-db-pre with -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com:
sudo webinoly -backup=s3 -profile=test -add-db-pre=patric.itrokkz.website -destination=/var/www/patric.itrokkz.website/db-backup -max=5 -bucket=itrokkz-bkp/database_bkp -s3-compatible-endpoint=https://ams3.digitaloceanspaces.com
Then I checked this file: /root/.duply/test/pre

And there is no -s3-compatible-endpoint parameter in that file.

To summarize: When you add add-db-pre to the backup profile, the -s3-compatible-endpoint parameter will not go into the file/command. And if you run the -s3-compatible-endpoint parameter to the add-db-pre command manually, it still cannot connect to the bucket.

What else can I do?

by Expert
I realize the "s3-compatible-endpoint" right now is only supported for source backups. We need to add support in our native S3 function. I will try to add this feature in the next release (v1.16.6).
by Rookie
Great! I really appreciate your work! Looking forward to the next release.

Thank you!
by Expert

Webinoly v1.16.6 has been released!

Can you please confirm that these issue has been fixed?


by Rookie
YES! This issue is fixed!

Thanks a lot for your help!
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.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

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