ru

VPS для баз данных: PostgreSQL offshore без утечки данных

Хранение базы данных на российских серверах создаёт риск принудительного доступа. Offshore PostgreSQL сервер в Исландии или Румынии физически недоступен для российских органов. Репликация обеспечивает отказоустойчивость.

Need this done for your project?

We implement, you ship. Async, documented, done in days.

Start a Brief

PostgreSQL с шифрованием

# Установка PostgreSQL 16
apt install -y postgresql-16 postgresql-client-16

# Настройка SSL
openssl req -new -x509 -days 365   -keyout /etc/postgresql/16/main/server.key   -out /etc/postgresql/16/main/server.crt -nodes

# /etc/postgresql/16/main/postgresql.conf
ssl = on
ssl_cert_file = 'server.crt'
ssl_key_file = 'server.key'
listen_addresses = 'localhost'  # Только через SSH туннель

# Шифрование данных pgcrypto
CREATE EXTENSION pgcrypto;
INSERT INTO users(email, password)
VALUES ('user@example.com', crypt('password', gen_salt('bf')));

Репликация и бэкапы

# Автоматические бэкапы через pg_dump
cat > /etc/cron.daily/pg-backup << 'EOF'
#!/bin/bash
BACKUP_DIR=/var/backups/postgresql
DATE=$(date +%Y%m%d)
pg_dumpall -U postgres | gzip > $BACKUP_DIR/all_$DATE.sql.gz
find $BACKUP_DIR -mtime +7 -delete
EOF

# Потоковая репликация (master-slave)
# На slave сервере:
pg_basebackup -h master-ip -D /var/lib/postgresql/16/main   -P -U replicator --wal-method=stream

Why Anubiz Host

100% async — no calls, no meetings
Delivered in days, not weeks
Full documentation included
Production-grade from day one
Security-first approach
Post-delivery support included

Ready to get started?

Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.

Anubiz Chat AI

Online