Magento2 Backup disabled - magento2

Magento Version 2.2.7.
I wanted to backup the system and database with the Tools given by Magento2.
But in the backend when I go to System - Backups, I get the message
Backup functionality is disabled
Backup functionality is currently disabled. Please use other means for backups
Where can i enable it?

You can enable Backup setting by going to Stores/Configuration, Advanced=>System, Backup Setting:
If you want to enable it with the CLI, you can use the command:
php bin/magento config:set system/backup/functionality_enabled 1

For the enable Backups to run below command.
php bin/magento config:set system/backup/functionality_enabled 1

Configuration - System - Backup Settings
vas

Related

Heroku: importing from S3 failing

I'm trying to import a local Postgresql database to Heroku and I'm following these steps https://devcenter.heroku.com/articles/heroku-postgres-import-export#import-to-heroku-postgres.
I have successfully:
created a dump
uploaded it to an S3 Bucket
created from AWS CLI a signed link
ran the command heroku pg:backups:restore '<SIGNED URL>' DATABASE_URL (adding -a with my app name).
The process to restore a backup starts correctly but then exits with this code:
! An error occurred and the backup did not finish.
!
! Could not initialize transfer
!
! Run heroku pg:backups:info r011 for more details.
Opening the log shows:
Database: BACKUP
Finished at: 2020-01-09 18:49:30 +0000
Status: Failed
Type: Manual
Backup Size: 0.00B (0% compression)
=== Backup Logs
2020-01-09 18:49:30 +0000 Could not initialize transfer
I've tried:
re-uploading the file to the bucket,
generating a new signed link,
putting the app in maintenance mode,
I've created a user in my IAM management service with full S3 access and saved the credentials in the app environment as from https://devcenter.heroku.com/articles/s3
Not sure where to go from here but would appreciate any help. (I'm on the hobby plan therefore I can't ask Heroku's support for help)
Edit: I also tried:
deleting and recreating the S3 Bucket
installing version 1 of the AWS CLI to see if by chance the structure of a presigned link had changed
Edit 2: Since I could not find a solution I've opted to migrate the hosting entirely on AWS for the moment
Make sure that your credentials on your machine that are stored in ~/.aws/ the default value is set to the credentials you created for your heroku configs. Then also make sure the signed url is created with those credentials and configs. I had to set my default credentials to the credentials I put in my heroku configs. Then I also had to set my default region in ~/.aws/config to match the bucket location. Should work after that.
Here are some instructions if you are on mac or linux.
Sorry Windows people. I would assume it is something similar.
Create new access id and key in IAM on AWS
Set heroku configs to use those credentials heroku config:set AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=yyy
Optional (You may have to set the bucket name in heroku config too)
On your machine set your credentials you just created to the default in ~/.aws/credentials
On your machine set your default region that corresponds to your bucket in ~/.aws/config
Create signed URL aws s3 presign s3://your-bucket-address/your-object
Run restore heroku pg:backups:restore '<SIGNED URL>' DATABASE_URL
Had the exact same error and made these 2 adjustments. In the S3 console click on the file you want to use for the backup. You should see the name fo your file followed by 4 tabs. In the General information tab, do the following:
Click on Make public to make the file available for download.
Get the URL for that object where it says URL of object
(should be something like https://mybucket.s3.amazonaws.com/my.file, you can test if it works by pasting that url in a new Chrome tab and hitting that url. That should trigger the download of your file)
Once the previous check is working you can proceed to
heroku pg:backups restore 'https://mybucket.s3.amazonaws.com/my.file' DATABASE_URL
I ran into the same issue and discovered the issue was that I had my bucket's region set as us-east rather than us-east-1.

Create, restore, and download MongoDB backups automatically on Swisscom Application Cloud

We can create create backups from the Developer Portal for MongoDB, but I'm wondering if this is exposed in any other way through the CLI?
Also, how can I access the backup to inspect it on my machine for example?
There is a CLI tool for making backups: mongodump (in the mongodb-org-tools package)
See also https://docs.mongodb.com/manual/core/backups/
Yes there are two CLI keystrokes to backup and restore
Backup
Mongodump backupPath
Restore
Mongorestore -d databasename backupPath
Ex- mongodump C:/user/desktop/backup
mongorestore -d DB1 C:/user/desktop/backup/DB1
Turns out you can't do anything outside of the UI. As per their docs: https://docs.developer.swisscom.com/devguide-sc/services/backups.html
There is an API for Service Instance backups and restores (the interface you see in developer portal). See other question Are mongodb backups made automatically?. There is even a CLI plugin to automate Developer Portal backups. Try it with cf install-plugin -r CF-Community "Swisscom Application Cloud".
You can't download the backups to your local computer. For that you you need to use cf ssh tunnel and mongodump/mongorestore. There is a guide to migrate Swisscom MongoDB to other DB provider (like your own computer), see here for the exact commands.

Check if OrientDB is in backup mode/

We need to check in client app if OrientDB is creating backup.
Is there any way to check?
OrientDB supports backup and and restore operations, like any database management system.
The Backup can be performed by running the BACKUP DATABASE command. It's possible to automatize backups using the Automatic Backup server plugin, by modifying the
orientdb-server-config.xml
you should see the scheduled time in the server, like this one:
If you didn't modified the correct parameter in this file, you shouldn't have automatic backup enabled.
In case if you're using the Enterprise Edition you can check backup settings in the Server Management Area.
Hope it helps
Regards

Automticaly setup add-on Heroku-Postgresql with one command

I want use PostgreSQL 9 in my app and to host on Heroku. By default heroku use Postgres 8.3.
To use Postgres 9, I need to install add-on heroku-postgres(https://addons.heroku.com/heroku-postgresql). In the documentation I found several steps to use Postgresql 9. It is simple, but I need to automatize and simplify all deploy steps.
Questions, I need at least one answer from these questions:
Is it possible by default use Postgresql 9 in Heroku without any add-on?
Is it possible to setup custom database urls names when I add the add-on like heroku addons:add heroku-postgresql:dev CUSTOME_HEROKU_DATABASE_URL_NAME?
Is it possible to use last database url in promote, e.g. heroku pg:promote HEROKU_POSTGRESQL_LAST?
Is it possible to promote database on adding add-on e.g.:heroku addons:add heroku-postgresql:dev --promote?
I don't want to use tools like grep or sed. This solution I built already.
PostgreSQL 9 is the default on Heroku now.
When you create a new Heroku database, it will always auto-generate a name for you (a color), you cannot change this.
There is no way to promote a new database to default without using grep / sed / customizations.
Is it possible by default use Postgresql 9 in Heroku without any add-on?
The dev plan will be the default on heroku. If you want it to be the default for you now, you can by adding this feature flag:
heroku labs:enable default-heroku-postgresql-dev
Is it possible to setup custom database urls names when I add the add-on like heroku addons:add heroku-postgresql:dev CUSTOME_HEROKU_DATABASE_URL_NAME?
No, not yet.
Is it possible to use last database url in promote, e.g. heroku pg:promote HEROKU_POSTGRESQL_LAST?
No, but if you have that flag set up, when you push code for the first time it will provision a dev database for you and it will have been promoted.
Is it possible to promote database on adding add-on e.g.:heroku addons:add heroku-postgresql:dev --promote?
No, but interesting idea.

Deleted user 'postgres' - oops

I accidentally deleted the user 'postgres' user the #userdel command and no longer have access to the database.
What can I do to create a new postgres user and how can I start postgresql again?
If I have to re-install postgresql, do I just delete my current postgres setup by removing the /usr/local/postgresql-8.3.6/ directory?
NOTE: I have no idea how to start postgresql. I basically downloaded a gzip file and unloaded it into a directory /usr/local/postgresql-8.3.6
Recreate the user - there's nothing special about it. Except it has no password ("!" in the password field in "/etc/shadow"), but that's normal for service accounts.
And you need this system account only for running the service.
If you have downloaded the source ("I basically downloaded a gzip file...") then you need to follow the installation instructions here to make a working installation out of it.
Easier would be to install the provided pre-packaged version of Postgres from Debian:
apt-get install postgresql-8.3 postgresql-contrib-8.3