remove emojis from console

This commit is contained in:
Dobromir Popov
2025-10-25 16:35:08 +03:00
parent 5aa4925cff
commit b8f54e61fa
75 changed files with 828 additions and 828 deletions

View File

@@ -15,7 +15,7 @@ This directory contains Docker Compose configurations and scripts for deploying
- At least 4GB RAM available for containers
- 50GB+ disk space for data storage
## 🚀 Quick Start
## Quick Start
1. **Copy environment file**:
```bash
@@ -264,7 +264,7 @@ For issues related to:
- Redis: Check [Redis docs](https://redis.io/documentation)
- Docker: Check [Docker docs](https://docs.docker.com/)
## 🔄 Updates
## Updates
This infrastructure supports:
- Rolling updates with zero downtime

View File

@@ -32,9 +32,9 @@ docker exec market_data_timescaledb pg_dump \
> "$BACKUP_DIR/timescaledb_backup_$TIMESTAMP.dump"
if [ $? -eq 0 ]; then
echo " TimescaleDB backup completed: timescaledb_backup_$TIMESTAMP.dump"
echo " TimescaleDB backup completed: timescaledb_backup_$TIMESTAMP.dump"
else
echo " TimescaleDB backup failed"
echo " TimescaleDB backup failed"
exit 1
fi
@@ -52,9 +52,9 @@ sleep 5
docker cp market_data_redis:/data/redis_backup_$TIMESTAMP.rdb "$BACKUP_DIR/"
if [ $? -eq 0 ]; then
echo " Redis backup completed: redis_backup_$TIMESTAMP.rdb"
echo " Redis backup completed: redis_backup_$TIMESTAMP.rdb"
else
echo " Redis backup failed"
echo " Redis backup failed"
exit 1
fi
@@ -88,7 +88,7 @@ rm "$BACKUP_DIR/timescaledb_backup_$TIMESTAMP.dump"
rm "$BACKUP_DIR/redis_backup_$TIMESTAMP.rdb"
rm "$BACKUP_DIR/backup_$TIMESTAMP.info"
echo " Compressed backup created: market_data_backup_$TIMESTAMP.tar.gz"
echo " Compressed backup created: market_data_backup_$TIMESTAMP.tar.gz"
# Clean up old backups
echo "🧹 Cleaning up old backups (older than $RETENTION_DAYS days)..."
@@ -102,7 +102,7 @@ echo " File: market_data_backup_$TIMESTAMP.tar.gz"
echo " Size: $BACKUP_SIZE"
echo " Location: $BACKUP_DIR"
echo ""
echo "🔄 To restore from this backup:"
echo " To restore from this backup:"
echo " ./restore.sh market_data_backup_$TIMESTAMP.tar.gz"
echo ""
echo " Backup process completed successfully!"
echo " Backup process completed successfully!"

View File

@@ -14,7 +14,7 @@ echo "📡 Testing connection to TimescaleDB..."
PGPASSWORD="market_data_secure_pass_2024" psql -h 192.168.0.10 -p 5432 -U market_user -d market_data -c "SELECT version();"
if [ $? -eq 0 ]; then
echo " Connection successful!"
echo " Connection successful!"
echo "🏗️ Creating database schema..."
@@ -22,16 +22,16 @@ if [ $? -eq 0 ]; then
PGPASSWORD="market_data_secure_pass_2024" psql -h 192.168.0.10 -p 5432 -U market_user -d market_data -f ../docker/init-scripts/01-init-timescaledb.sql
if [ $? -eq 0 ]; then
echo " Database schema initialized successfully!"
echo " Database schema initialized successfully!"
echo "📊 Verifying tables..."
PGPASSWORD="market_data_secure_pass_2024" psql -h 192.168.0.10 -p 5432 -U market_user -d market_data -c "\dt market_data.*"
else
echo " Schema initialization failed"
echo " Schema initialization failed"
exit 1
fi
else
echo " Cannot connect to database"
echo " Cannot connect to database"
exit 1
fi

View File

@@ -7,7 +7,7 @@ set -e
# Check if backup file is provided
if [ $# -eq 0 ]; then
echo " Usage: $0 <backup_file.tar.gz>"
echo " Usage: $0 <backup_file.tar.gz>"
echo "Available backups:"
ls -la ./backups/market_data_backup_*.tar.gz 2>/dev/null || echo "No backups found"
exit 1
@@ -22,12 +22,12 @@ if [ -f .env ]; then
source .env
fi
echo "🔄 Starting restore process..."
echo " Starting restore process..."
echo "📁 Backup file: $BACKUP_FILE"
# Check if backup file exists
if [ ! -f "$BACKUP_FILE" ]; then
echo " Backup file not found: $BACKUP_FILE"
echo " Backup file not found: $BACKUP_FILE"
exit 1
fi
@@ -44,7 +44,7 @@ REDIS_BACKUP=$(find "$RESTORE_DIR" -name "redis_backup_*.rdb" | head -1)
BACKUP_INFO=$(find "$RESTORE_DIR" -name "backup_*.info" | head -1)
if [ -z "$TIMESCALE_BACKUP" ] || [ -z "$REDIS_BACKUP" ]; then
echo " Invalid backup file structure"
echo " Invalid backup file structure"
rm -rf "$RESTORE_DIR"
exit 1
fi
@@ -57,10 +57,10 @@ if [ -f "$BACKUP_INFO" ]; then
fi
# Confirm restore
read -p "⚠️ This will replace all existing data. Continue? (y/N): " -n 1 -r
read -p " This will replace all existing data. Continue? (y/N): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo " Restore cancelled"
echo " Restore cancelled"
rm -rf "$RESTORE_DIR"
exit 1
fi
@@ -85,7 +85,7 @@ sleep 30
# Check if TimescaleDB is ready
if ! docker exec market_data_timescaledb pg_isready -U market_user -d market_data; then
echo " TimescaleDB is not ready"
echo " TimescaleDB is not ready"
exit 1
fi
@@ -105,9 +105,9 @@ docker exec market_data_timescaledb pg_restore \
/tmp/restore.dump
if [ $? -eq 0 ]; then
echo " TimescaleDB restore completed"
echo " TimescaleDB restore completed"
else
echo " TimescaleDB restore failed"
echo " TimescaleDB restore failed"
exit 1
fi
@@ -136,7 +136,7 @@ echo "🔍 Verifying restore..."
# Check TimescaleDB
if docker exec market_data_timescaledb pg_isready -U market_user -d market_data; then
echo " TimescaleDB is ready"
echo " TimescaleDB is ready"
# Show table counts
echo "📊 Database table counts:"
@@ -150,19 +150,19 @@ if docker exec market_data_timescaledb pg_isready -U market_user -d market_data;
ORDER BY tablename;
"
else
echo " TimescaleDB verification failed"
echo " TimescaleDB verification failed"
exit 1
fi
# Check Redis
if docker exec market_data_redis redis-cli -a "$REDIS_PASSWORD" ping | grep -q PONG; then
echo " Redis is ready"
echo " Redis is ready"
# Show Redis info
echo "📦 Redis database info:"
docker exec market_data_redis redis-cli -a "$REDIS_PASSWORD" INFO keyspace
else
echo " Redis verification failed"
echo " Redis verification failed"
exit 1
fi
@@ -178,7 +178,7 @@ echo " Source: $BACKUP_FILE"
echo " Timestamp: $TIMESTAMP"
echo " Safety backup: ./backups/pre_restore_$TIMESTAMP/"
echo ""
echo "⚠️ If you encounter any issues, you can restore the safety backup:"
echo " If you encounter any issues, you can restore the safety backup:"
echo " docker-compose -f timescaledb-compose.yml down"
echo " docker volume rm market_data_timescale_data market_data_redis_data"
echo " docker volume create market_data_timescale_data"