Skip to content

Migration Module API Reference

graphite.migration

Helper module to update Graphite databases and handle other migrations

Classes:

  • Migration

    Utility for migrating from older versions

Classes

Migration

Utility for migrating from older versions

Methods:

Functions
convert_pickle_to_json staticmethod
convert_pickle_to_json(pickle_file: str, json_file: str, delete_original: bool = False) -> None

Convert a pickle file to JSON format

Parameters:

  • pickle_file (str) –

    Path to existing pickle file

  • json_file (str) –

    Path for new JSON file

  • delete_original (bool, default: False ) –

    Whether to delete pickle file after conversion

detect_pickle_and_convert_to_json staticmethod
detect_pickle_and_convert_to_json(directory: str, pattern: str = '*.db', delete_originals: bool = False) -> None

Find and convert all pickle files in a directory

Parameters:

  • directory (str) –

    Directory to scan

  • pattern (str, default: '*.db' ) –

    File pattern to match (default: *.db)

  • delete_originals (bool, default: False ) –

    Whether to delete pickle files after conversion