Skip to content

Tool to archive Gluster Changelogs after consumed by Geo-replication

Notifications You must be signed in to change notification settings

aravindavk/archive_gluster_changelogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 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.

Usage

# When using python2
mkdir <archive_dir>
python2 archive_georep_changelogs_p2.py <brick_path> <archive_dir>
cd <archive_dir>
tar cvzf <archive>.tar.gz <archive>/

# When using python3
mkdir <archive_dir>
python3 archive_georep_changelogs_p3.py <brick_path> <archive_dir>

Example:

mkdir /backups/changelogs_bricks_b1_20170119
python3 archive_georep_changelogs_p3.py /bricks/b1 /backups/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.
  • The python3 version of the script creates a tgz archive and adds all changelog files to it.

About

Tool to archive Gluster Changelogs after consumed by Geo-replication

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages