Environment
- Yugabyte Platform
Issue
Backup or restore is failing and not enough logs are available to troubleshoot or identify the issue in application logs and verbose logs.
- Additional Information: This article is applicable for backup configured on Microsoft Azure storage or any other compatible
Resolution
Overview
There could be many reasons for the failure of backup and restore. This guide will help in getting verbose logs for azcopy
. To get these logs, We have to edit the yb_backup.py
file.
Steps
1. Login to the `yugaware` container.
- For Replicated installation
docker exec -it yugaware bash
- For Kubernetes installation
kubectl exec -it <pod_name> -n <namespace_name> -c yugaware -- bash
2. Before making any changes to the backup script, Take a backup of existing yb_backup.py
script
cd /opt/yugabyte/devops/bin/
cp yb_backup.py yb_backup.py_bkp_<date>
3. To enable verbose
output, make changes in function _command_list_prefix
in class AzBackupStorage
. After making changes, The function should look like below: (Notice the --verbose
)
def _command_list_prefix(self):
return "azcopy --log-level=DEBUG"
4. Then we can run backup or restore using the steps described in this article.
5. Once troubleshooting is done, We can revert the changes to avoid unnecessary verbose loggings.
Related Articles
- How to get verbose logs for backup and restore. – Yugabyte
Comments
0 comments
Please sign in to leave a comment.