The cloud database MongoDB (Ali cloud) to restore physical backup file downloads to the local self-built database encountered three problems

Sometimes we may need to download to a local database on the cloud, here are three small problems we encounter when operating MongoDB database.

In fact, the RDS Help documentation written are more detailed, and everyone in the first operation, you can peruse it, to avoid unnecessary problems.

 

Problem 1

By wgetcommand MongoDB physical backup file downloading cloud, intermediate url & special characters need to be placed url '(single quotes).

Otherwise error;

[1] 193923
[2] 193924
[2]+  Done                    Expires=1565425103
..........................................................
..........................................................
..........................................................
HTTP request sent, awaiting response... 403 Forbidden
2019-08-05 16:19:50 ERROR 403: Forbidden.


[1]+  Exit 8 

 

Problem 2

When start MongoDB service error. View the boot log, the main error information is as follows;

 

2019-08-05T15:30:12.099+0800 I STORAGE  [initandlisten] exception in initAndListen: 72 Requested option conflicts with current storage engine option for directoryPerDB; you requested false but the current server storage is already set to true and cannot be changed, terminating
2019-08-05T15:30:12.099+0800 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2019-08-05T15:30:12.099+0800 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2019-08-05T15:30:12.099+0800 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2019-08-05T15:30:12.099+0800 I CONTROL  [initandlisten] now exiting
2019-08-05T15:30:12.099+0800 I CONTROL  [initandlisten] shutting down with code:100

As can be seen from the above error in the main configuration problems directoryPerDB.

Tip directoryperdb needs to be set to true.

Problem 3

When we add the following parameters in the configuration file mongodb.

directoryperdb=ture

Given as follows:

Aug 05 15:47:04 weixin-qq01 mongod[192116]: Error parsing INI config file: the argument ('ture') for option 'directoryperdb' is invalid. Valid choices are 'on|off', 'yes|no', '1|0' and 'true|false'

The correct settings are as follows;

directoryperdb=on

 

Additional information:

(1): set to true, different files each database is stored in the specified directory DBPATH folder. This option may be configured MongoDB data stored on different disk devices, to increase the write throughput capacity or disk. The default is false.

(2): Description MongoDB RDS for instance directoryperdb provided ture. Also provides a reference for the other parameter settings MongodB examples of our local, also recommended that directoryperdb set to ture.

 

Guess you like

Origin www.cnblogs.com/xuliuzai/p/11322152.html