Environment
- Yugabyte Platform
Issue
A Backup or Restore is failing and not enough information is available in application.log or verbose logs to troubleshoot the issue.
- Additional Information: This article is applicable for backup configured on AWS S3 or MinIO storage.
Resolution
Overview
There could be many reasons for the failure of backup and restore. This guide will help in getting verbose logs for s3cmd. To get these logs edit the yb_backup.py
file, remembering to always take a backup or notate changes.
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 the 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 S3BackupStorage
. After making changes, The function should look like below: (Notice the --verbose
)
def _command_list_prefix(self):
# If 's3cmd get' fails it creates zero-length file, '--force' is needed to
# override this empty file on the next retry-step.
return ['s3cmd', '--verbose', '--force', '--no-check-certificate', '--config=%s'
% self.options.cloud_cfg_file_path]
3. Then we can run backup or restore using the steps described in this article.
4. Once troubleshooting is done, revert the changes to avoid unnecessary disk space utilization.
Related Articles
- How to get verbose logs for backup and restore. – Yugabyte
- How to get verbose logs for azcopy. – Yugabyte
Comments
0 comments
Please sign in to leave a comment.