Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add document how to find mysql backup file and print path in output #589

Merged
merged 7 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cou/steps/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ async def backup(model: Model) -> Path:
await model.run_on_unit(unit_name, f"chmod o+rx {basedir}")

local_file = COU_DATA / os.path.basename(remote_file)
logger.info("SCP from mysql-innodb-cluster:%s to %s ...", remote_file, local_file)
logger.info("SCP from mysql-innodb-cluster:%s to %s ...", remote_file, local_file)
await model.scp_from_unit(unit_name, remote_file, str(local_file))
logger.info("Backup MySQL to %s", local_file)
jneo8 marked this conversation as resolved.
Show resolved Hide resolved

logger.info("Remove permissions to read mysql-innodb-cluster:%s ...", basedir)
await model.run_on_unit(unit_name, f"chmod o-rx {basedir}")
Expand Down
5 changes: 5 additions & 0 deletions docs/how-to/find-mysql-backup-file.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
======================
samuelallan72 marked this conversation as resolved.
Show resolved Hide resolved
Find mysql backup file
======================

The file is store under *$COU_DATA* , which is */home/$USER/.local/share/cou* if *$USER* exists else current directory.
samuelallan72 marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions docs/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ are possible with **COU**.
purge-data-on-shadow-table
test-on-juju-openstack-provider
watch-cou-logs
find-mysql-backup-file
Loading