Skip to content

Instantly share code, notes, and snippets.

@ogny
Forked from tjackowiak/gist:5058743
Created August 26, 2016 10:59
Show Gist options
  • Save ogny/2e494823da5cca8768d3d2bab8bdfbb0 to your computer and use it in GitHub Desktop.
Save ogny/2e494823da5cca8768d3d2bab8bdfbb0 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