Skip to content

Anya Core Upgrade Guide

Table of Contents

[AIR-3][AIS-3][BPC-3][RES-3]

Overview

This document provides guidelines for upgrading Anya Core between versions. Always review this guide before performing an upgrade to ensure a smooth transition.

Version Compatibility

From Version To Version Upgrade Path Notes
≤ 0.2.0 0.3.0 Full reinstall required Major architectural changes
0.3.0 ≥ 0.3.1 In-place upgrade Follow these instructions

Pre-Upgrade Checklist

  1. Backup Important Data
# Create backup directory
mkdir -p ~/anya_backup_$(date +%Y%m%d)

# Backup configuration
cp -r /etc/anya ~/anya_backup_$(date +%Y%m%d)/config

# Backup wallet and chain data (if applicable)
cp -r ~/.anya/{wallets,chaindata} ~/anya_backup_$(date +%Y%m%d)/
  1. Check System Requirements
  2. Verify disk space: df -h / (minimum 20GB free)
  3. Check memory: free -h (minimum 4GB RAM)
  4. Verify Docker: docker --version (≥ 20.10)
  5. Verify Docker Compose: docker-compose --version (≥ 2.0)

  6. Review Release Notes Always check the CHANGELOG.md for breaking changes and new requirements.

Upgrade Procedure

Standard Upgrade (v0.3.0+)

  1. Stop Running Services
# Stop Anya Core service
sudo systemctl stop anya-core

# Stop monitoring stack (if running)
cd monitoring
docker-compose down
cd ..
  1. Update Repository
# Fetch latest changes
git fetch origin

# Checkout the target version
git checkout v0.3.0  # Replace with target version

# Pull latest changes
git pull
  1. Run Database Migrations (if any)
./scripts/migrate.sh
  1. Update Configuration
# Backup current config
cp config/config.toml config/config.toml.bak

# Update configuration (preserve your settings)
./scripts/update-config.sh
  1. Restart Services
# Start Anya Core
sudo systemctl start anya-core

# Start monitoring (if enabled)
cd monitoring
./start-monitoring.sh
cd ..

Monitoring Stack Upgrade

If upgrading the monitoring stack separately:

cd monitoring

# Pull latest container images
docker-compose pull

# Recreate containers with new images
docker-compose up -d --force-recreate

# Verify all services are running
docker-compose ps

Post-Upgrade Verification

  1. Check Service Status
# Check Anya Core
systemctl status anya-core

# Check monitoring stack
docker-compose -f monitoring/docker-compose.yml ps
  1. Verify Data Integrity
  2. Check logs for errors: journalctl -u anya-core -n 50
  3. Verify metrics are being collected in Grafana
  4. Test alert notifications

  5. Update Documentation

  6. Review and update any local documentation
  7. Note any configuration changes in your runbook

Rollback Procedure

If you encounter issues after upgrade:

  1. Stop Services
sudo systemctl stop anya-core
cd monitoring
docker-compose down
cd ..
  1. Restore Backup
# Restore configuration
cp -r ~/anya_backup_$(date +%Y%m%d)/config /etc/anya/

# Restore data (if needed)
cp -r ~/anya_backup_$(date +%Y%m%d)/* ~/.anya/
  1. Revert Code
git checkout <previous-version-tag>
  1. Restart Services
sudo systemctl start anya-core
cd monitoring
./start-monitoring.sh

Troubleshooting

Common Issues

  1. Version Mismatch
  2. Symptom: Services fail to start after upgrade
  3. Solution: Ensure all components are at compatible versions

  4. Database Migration Failures

  5. Symptom: Errors during migration
  6. Solution: Restore from backup and check migration scripts

  7. Permission Issues

  8. Symptom: Permission denied errors
  9. Solution: sudo chown -R anya:anya /var/lib/anya

Getting Help

If you encounter issues:

  1. Check logs: journalctl -u anya-core -n 100
  2. Review Troubleshooting Guide
  3. Open an issue on GitHub
  4. Email support: botshelomokoka@gmail.com

Security Considerations

  • Always verify checksums of downloaded packages
  • Use secure channels for all file transfers
  • Rotate credentials after upgrade
  • Review and update firewall rules if needed

AI Labeling

  • [AIR-3] - Automated upgrade process with validation
  • [AIS-3] - Secure upgrade procedures with rollback
  • [BPC-3] - Follows Bitcoin node upgrade best practices
  • [RES-3] - Resilient upgrade process with verification

See Also