Skip to content

Tool to archive Gluster Changelogs after consumed by Geo-replication

Notifications You must be signed in to change notification settings

link2/archive_gluster_changelogs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Tool to archive Gluster Changelogs

Changelogs are not required for Geo-replication once the Changelogs are consumed and synced to Slave. This tool helps to archive the changelogs which are already consumed.

NOTE:

  • If Geo-replication is used, use this tool only when all the Geo-rep sessions are in Changelog mode(Geo-rep Status will show this information)

Usage

mkdir <archive_dir>
python main.py <brick_path> <archive_dir>
cd <archive_dir>
tar cvzf <archive>.tar.gz <archive>/

Example:

mkdir /backups/changelogs_bricks_b1_20170119
python main.py /bricks/b1 /backups/changelogs_bricks_b1_20170119
cd /backups/
tar cvzf changelogs_bricks_b1_20170119.tar.gz changelogs_bricks_b1_20170119

How it works?

  • List xattrs for given brick path
  • If xattr name ends with .stime, read the xattr value(Repeat this for all the stime xattrs)
  • Gets Timestamp from brick status files of Glusterfind
  • Archive all changelogs files if Changelog file Timestamp is less than min of stime values collected in previous steps.

About

Tool to archive Gluster Changelogs after consumed by Geo-replication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%