Last active
February 6, 2021 09:44
-
-
Save mysqlboy/de9067aa394f31a9adb450ac25fa55d3 to your computer and use it in GitHub Desktop.
Xtrabackup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start netcat on port 9999 on joiner | |
nc -l -p 9999 | xbstream -x -C . | |
# Start the backup from donor | |
innobackupex \ | |
--compress \ | |
--compress-threads=4 \ | |
--parallel=4 \ | |
--stream=xbstream . \ | |
| nc 9999 | |
## Prepare the backup for recovery | |
# Decompress the backup files and remove the compressed version | |
xtrabackup --target-dir=. --decompress --remove-original | |
# Apply the innodb redo log to the data files | |
xtrabackup --target-dir=. --prepare | |
# Modify recursively the file ownership to ensure service user owns the database assets | |
chown -R mysql:mysql . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment