Troubleshooting

Soluções para problemas comuns do BackupAlly.

Erros de Conexão

MySQL: Connection Refused

Error: Connection refused (os error 111)

Causas:

  • MySQL não está rodando
  • Porta incorreta
  • Firewall bloqueando

Soluções:

# Verificar se MySQL está rodando
sudo systemctl status mysql

# Testar conexão
mysql -h localhost -u backup -p

# Verificar porta
netstat -tlnp | grep 3306

PostgreSQL: Authentication Failed

Error: password authentication failed

Soluções:

  1. Verifique credenciais:
psql -h localhost -U backup -d postgres
  1. Verifique pg_hba.conf:
host    all    backup    127.0.0.1/32    scram-sha-256
  1. Reload config:
sudo systemctl reload postgresql

MongoDB: Connection Timeout

Error: connection timed out

Soluções:

# Verificar se MongoDB está rodando
sudo systemctl status mongod

# Testar conexão
mongosh --eval "db.adminCommand('ping')"

Erros de Permissão

Permission Denied

Error: Permission denied (os error 13)

Soluções:

  1. Execute como root:
sudo backupally backup --target website
  1. Ou ajuste permissões do diretório:
sudo chown -R backupally:backupally /var/www/html

MySQL: Access Denied

Error: Access denied for user 'backup'@'localhost'

Solução:

GRANT SELECT, SHOW DATABASES, LOCK TABLES ON *.* TO 'backup'@'localhost';
FLUSH PRIVILEGES;

Erros de Storage

S3: Access Denied

Error: Access Denied

Causas:

  • Credenciais inválidas
  • Permissões insuficientes
  • Bucket não existe

Soluções:

  1. Verifique credenciais:
backupally secrets get aws_access_key
  1. Verifique permissões IAM:
{
  "Effect": "Allow",
  "Action": [
    "s3:PutObject",
    "s3:GetObject",
    "s3:ListBucket",
    "s3:DeleteObject"
  ],
  "Resource": [
    "arn:aws:s3:::bucket-name",
    "arn:aws:s3:::bucket-name/*"
  ]
}

B2: Invalid Authorization

Error: Invalid authorization token

Solução:

Regenere a Application Key no console B2 e atualize:

backupally secrets set b2_key_id "novo-key-id"
backupally secrets set b2_app_key "novo-app-key"

Espaço em Disco Insuficiente

Error: No space left on device

Soluções:

  1. Verifique espaço:
df -h /tmp
df -h /backup
  1. Limpe temporários:
rm -rf /tmp/backupally/*
  1. Ajuste diretório temporário:
[global]
default_temp_path = "/var/tmp/backupally"

Erros de Criptografia

Invalid Key

Error: Failed to decrypt: Invalid key

Causa: Tentando restaurar com chave diferente.

Solução:

  1. Verifique fingerprint do backup:
backupally inspect backup.ally
  1. Use a chave correta:
backupally restore \
  --target mysql-prod \
  --snapshot snap_xxx \
  --key /path/to/correct-key.pem

Key Not Found

Error: Key file not found

Solução:

# Verificar se chave existe
ls -la /etc/backupally/keys/

# Regenerar se necessário
backupally keys generate --name default --set-default

Erros de Scheduler

Task Não Executa

Verificações:

  1. Task está habilitada?
backupally task list
  1. Scheduler está rodando?
sudo systemctl status backupally-scheduler
  1. Condição não atendida?
# Ver logs
sudo journalctl -u backupally-scheduler -f
  1. Fora da janela?

Verifique [window] na task.

Hot Reload Não Funciona

Solução:

# Forçar reload
sudo systemctl reload backupally-scheduler

# Ou reiniciar
sudo systemctl restart backupally-scheduler

Erros de Rede

Timeout

Error: Connection timed out

Soluções:

  1. Aumente timeout:
[network]
timeout_seconds = 600
  1. Verifique conectividade:
curl -v https://s3.amazonaws.com

SSL Certificate Error

Error: certificate verify failed

Soluções:

  1. Atualize certificados:
sudo apt update && sudo apt install ca-certificates
  1. Para MinIO self-signed:
[[storage]]
driver = "minio"
verify_ssl = false

Logs e Debug

Habilitar Debug

backupally --log-level debug backup --target mysql-prod

Ver Logs do Scheduler

sudo journalctl -u backupally-scheduler -f

Arquivo de Log

tail -f /var/log/backupally/backupally.log

Verificar Configuração

backupally config verify
backupally task validate mysql-prod

Obter Ajuda

Se o problema persistir:

  1. Verifique logs com --log-level debug
  2. Consulte a documentação
  3. Abra issue no repositório
By Borlot.com.br on 11/02/2026