Got it

How to collect redis database logs

Created: Feb 28, 2022 13:32:49Latest reply: Feb 28, 2022 13:36:44 184 1 1 0 0
  HiCoins as reward: 0 (problem unresolved)

Hello, friends!

Can you guide me to collect Redis database logs?

Product: Huawei Cloud Stack 8.0.1

  • x
  • convention:

Featured Answers
olive.zhao
Admin Created Feb 28, 2022 13:36:44

Hello, friend!

Please refer to the following steps:

1. Use PuTTY to log in to the node where the database resides as the sopuser user in SSH mode. 

2. Run the following command to switch to the root user:

sudo su root

Password: Password of the root user

3. Run the following command to create a temporary directory for storing logs: In the following operations, the log_info directory is used as an example. Replace it based on site requirements.

mkdir /tmp/log_info

4. Run the following command to change the permission on the temporary directory for storing logs:

chmod 750 /tmp/log_info

5. Run the following commands to copy the database logs to the temporary directory and set the owner group and permission:

cp /opt/redis/data/Database instance name/Database instance name-login.log /tmp/log_info

chmod 640 /tmp/log_info/Database instance name-login.log

chown -R sopuser:wheel /tmp/log_info

exit

6. Use FileZilla to download OS log files in /tmp/log_info to any directory on the local PC as the sopuser user in SFTP mode.

7. After downloading the logs, delete the temporary directory.

a. Use PuTTY to log in to the database node as the sopuser user in SSH mode.

b. Run the following commands to delete the temporary directory:

cd /tmp

rm -rf log_info

Hope this helps!

View more
  • x
  • convention:

All Answers
olive.zhao
olive.zhao Admin Created Feb 28, 2022 13:36:44

Hello, friend!

Please refer to the following steps:

1. Use PuTTY to log in to the node where the database resides as the sopuser user in SSH mode. 

2. Run the following command to switch to the root user:

sudo su root

Password: Password of the root user

3. Run the following command to create a temporary directory for storing logs: In the following operations, the log_info directory is used as an example. Replace it based on site requirements.

mkdir /tmp/log_info

4. Run the following command to change the permission on the temporary directory for storing logs:

chmod 750 /tmp/log_info

5. Run the following commands to copy the database logs to the temporary directory and set the owner group and permission:

cp /opt/redis/data/Database instance name/Database instance name-login.log /tmp/log_info

chmod 640 /tmp/log_info/Database instance name-login.log

chown -R sopuser:wheel /tmp/log_info

exit

6. Use FileZilla to download OS log files in /tmp/log_info to any directory on the local PC as the sopuser user in SFTP mode.

7. After downloading the logs, delete the temporary directory.

a. Use PuTTY to log in to the database node as the sopuser user in SSH mode.

b. Run the following commands to delete the temporary directory:

cd /tmp

rm -rf log_info

Hope this helps!

View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.