Sunucuyu Yedekleme Alanına yedekleme (SFTP)
Sunucunuza bağlı bir yedekleme alanı alın, SFTP parolasını okuyun ve restic ya da rclone ile yedek gönderin.
Yedekleme Alanı kesin kotalı bir SFTP alanıdır (50 GB - 1 TB, tr-ist-1). Hesabınızdaki BİR etkin sunucuya bağlıdır ve yalnız o sunucunun IPv4 adresleri bağlanabilir (port 2201). Snapshot yoktur: iptal tüm dosyaları hemen siler. Sipariş için cloud_order, parolayı okumak için services_write kapsamı gerekir.
1. Paketler, teklif ve sipariş#
curl -s https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/plans -H "Authorization: Bearer $GYRO_TOKEN" # paketler + sunucularınız
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces \
-H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"plan":"100gb","cycle":"monthly","server_id":12345,"name":"gyro-proje-yedek","confirm":true}'gyro backup-space plans
gyro backup-space create --plan 100gb --server-id 12345 --name gyro-proje-yedek --dry-run
gyro backup-space create --plan 100gb --server-id 12345 --name gyro-proje-yedek --yesresource "gyro_backup_space" "yedek" {
plan = "100gb"
cycle = "monthly"
server_id = 12345
name = "gyro-proje-yedek"
}
# host, port, user, path ve gizli (sensitive) password öznitelik olarak gelir2. Bağlantı bilgisi ve parola#
curl -s https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/67890 -H "Authorization: Bearer $GYRO_TOKEN" # state: pending -> active
curl -s https://www.gyrohosting.com/api/v1/client/cloud/backup-spaces/67890/credentials -H "Authorization: Bearer $GYRO_TOKEN" # adres, port, kullanıcı, parolagyro backup-space get 67890
gyro backup-space credentials 67890 -o json3. Bağlı sunucudan yedek gönderin#
export RESTIC_PASSWORD_FILE=/root/.restic-pass # restic şifreler; bu dosyayı saklayın
restic -r sftp://[email protected]:2201//veri/restic init
restic -r sftp://[email protected]:2201//veri/restic backup /etc /var/wwwrclone config create gyro-yedek sftp host 45.87.174.12 port 2201 user y-m67890 pass "$(rclone obscure "$SFTP_PASSWORD")"
rclone sync /var/backups gyro-yedek:/veri/backupsYalnız /veri yazılabilir. Dolan alan yeni yazmayı reddeder (aşım ücreti yok). POST /cloud/backup-spaces/{id}/password yeni parola üretir (eskisi hemen geçersiz), PUT /cloud/backup-spaces/{id}/server erişimi başka sunucuya taşır, boyut değişimi /cloud/services/{id}/resize-options ve /resize ile yapılır. DELETE /cloud/backup-spaces/{id}?confirm=true&immediate=true alanı ve tüm dosyaları kalıcı olarak siler.