Skip to content

Instantly share code, notes, and snippets.

@tclh123
Forked from tjackowiak/gist:5058743
Created March 17, 2021 09:11
Show Gist options
  • Save tclh123/3455441d0d2340cccaf2f81e327a3dd2 to your computer and use it in GitHub Desktop.
Save tclh123/3455441d0d2340cccaf2f81e327a3dd2 to your computer and use it in GitHub Desktop.
Moving Graphite database
1. Stop Apache
sudo /etc/init.d/apache2 stop
2. Stop Carbon
sudo su www-data
cd /opt/graphite/
./bin/carbon-cache.py stop
3. Move whisper directory to new location
3. Edit /opt/graphite/conf/carbon.conf
Set LOCAL_DATA_DIR to new database directory
4. Link /opt/graphite/storage/whisper to the same dir as set in LOCAL_DATA_DIR
5. Set correct files owner
sudo chown -R www-data:www-data /opt/graphite/storage/whisper/
6. Check if all files moved successfully
find /opt/graphite/storage/whisper/ -print -name '*.wsp' -type f -exec whisper-info.py {} \; | grep Error
If no file is corrupted move on, otherwise delete corrupted files
7. Start Carbon
sudo su www-data
cd /opt/graphite/
./bin/carbon-cache.py start
8 Start Apache
sudo /etc/init.d/apache2 start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment