TransWikia.com

Segragating First LSN and Last LSN from Output MySQL

Database Administrators Asked by JABIR BAIG on December 24, 2020

I am trying to Build a Incremental Backup Script using Percona Innobackupex , what my problem is i need a shell script to segregate the both First LSN and Last LSN from the Log Output of Full Backup, lets say my Output from the log File is

cat /data/test_backup/test.log | grep "Transaction log of lsn"

xtrabackup: Transaction log of lsn (38491856810) to (38491856819) was copied.

i want to segregate the data in the braces as

FirstLSN = 38491856810
LastLSN = 38491856819

into an output file and use the Last LSN to take incremental Backup or append the LSN Detail directly to my Full backup Script running Log

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP