Public Beta — use code LAUNCH15 for 15% off any plan
Back to blog

Cara backup website otomatis — aturan 3-2-1 untuk pemula

29 May 2026 · 3 min read

Mengapa backup yang benar penting

Cerita yang sering terjadi:

"Hosting kami crash kemarin malam. Provider bilang database corrupt, last backup mereka 5 hari lalu. Kami kehilangan 5 hari order WooCommerce — Rp 12 juta hilang."

Backup yang tidak bisa restore = tidak ada gunanya. Backup yang ada di server yang sama dengan data asli = single point of failure.

Aturan 3-2-1 dari industri data backup:

  • 3 copy dari data
  • 2 medium berbeda (e.g., HDD lokal + cloud)
  • 1 offsite (lokasi geografis berbeda)

Untuk website, terjemahannya:

  1. Copy 1: data live di server hosting (production)
  2. Copy 2: backup harian provider (sama datacenter, beda volume)
  3. Copy 3: backup mingguan ke cloud offsite (Google Drive, S3, dll)

Kalau hosting hilang total (akun di-suspend, datacenter terbakar — yes ini terjadi di OVH 2021), copy 3 tetap selamat.

Tipe backup yang harus kamu punya

1. Backup file

  • File aplikasi: public_html/ (WordPress core, custom theme/plugin, uploads)
  • Config: .htaccess, wp-config.php, .env
  • Email mailbox (kalau pakai email hosting)

2. Backup database

  • MySQL dump format SQL
  • Khusus untuk WordPress + WooCommerce: tabel *_options, *_posts, *_postmeta, *_users, *_woocommerce_* (kalau ada)

3. Backup config server (kalau VPS)

  • Nginx/Apache config
  • SSL certificate + private key
  • Cron jobs
  • Custom system service

Untuk shared hosting cPanel, config server di-manage provider — tidak perlu backup sendiri.

Setup backup otomatis untuk WordPress

Plugin: UpdraftPlus (paling populer, free + paid)

Setup awal (10 menit):

  1. WordPress admin → Plugins → Add New → cari "UpdraftPlus" → Install + Activate
  2. Settings → UpdraftPlus Backups → Settings tab
  3. Files backup schedule: Weekly, retention 4 backups (= 1 bulan)
  4. Database backup schedule: Daily, retention 14 backups (= 2 minggu)
  5. Remote storage: pilih Google Drive (paling mudah) atau Amazon S3 (lebih scalable)
  6. Klik authorize → login Google → grant permission
  7. Save Changes

Hasil:

  • Database di-backup tiap malam → upload ke Google Drive folder /UpdraftPlus/yourdomain.com/
  • File di-backup tiap Senin malam → upload juga
  • Retention otomatis purge backup lama → no storage explosion

Test restore (penting!):

Tiap 3 bulan, lakukan restore drill:

  1. Setup WordPress test di subdomain (test.domain.com)
  2. UpdraftPlus → klik salah satu backup → Restore
  3. Verify content + database restored
  4. Hapus subdomain test

Backup yang tidak pernah di-test = bug menunggu nyata.

Untuk Laravel / generic PHP

UpdraftPlus WordPress-specific. Untuk Laravel:

Setup spatie/laravel-backup package:

composer require spatie/laravel-backup
php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"

Edit config/backup.php:

'destination' => [
    'disks' => [
        's3-backup',  // configured di config/filesystems.php
    ],
],

Schedule di app/Console/Kernel.php:

$schedule->command('backup:clean')->daily()->at('01:00');
$schedule->command('backup:run')->daily()->at('02:00');

Hasil: file + database di-backup harian ke S3.

Setup backup di cPanel (tanpa plugin)

Kalau tidak mau pakai plugin, cPanel built-in:

  1. cPanel → Backup → Backup Wizard → Full Backup
  2. Pilih destination: Remote FTP atau SCP — input kredensial server backup terpisah
  3. Sayangnya tidak otomatis dijadwalkan — manual run

Untuk otomasi: cron job dengan script bash yang generate backup + rsync ke remote:

#!/bin/bash
# /home/user/backup.sh
DATE=$(date +%Y-%m-%d)
mysqldump -u user -ppassword dbname > /home/user/backups/db_$DATE.sql
tar -czf /home/user/backups/files_$DATE.tar.gz /home/user/public_html
rsync -avz /home/user/backups/ user@backup-server:/backups/yourdomain.com/
find /home/user/backups/ -mtime +30 -delete

Cron di cPanel → Cron Jobs:

0 3 * * * /home/user/backup.sh

Daily jam 3 pagi.

Offsite storage — pilih yang tepat

Provider Free tier Bayar Cocok untuk
Google Drive 15 GB $1.99/100GB WordPress small-mid
Dropbox 2 GB $9.99/2TB Personal
Amazon S3 None ~$0.023/GB Scale, durability
Cloudflare R2 10 GB $0.015/GB, no egress fee Mid scale
Backblaze B2 10 GB $0.005/GB Largest backup volume

Rekomendasi:

  • WordPress site <5GB: Google Drive (gampang setup)
  • 5-50GB: Cloudflare R2 atau Backblaze B2 (no egress fee = restore tidak charge)
  • 50GB+: AWS S3 dengan lifecycle policy ke Glacier (deep archive)

Backup yang sering luput

  1. Email mailbox — di hosting yang sama, tapi tidak ikut WordPress backup. Sync via IMAP ke Thunderbird/Outlook lokal secara berkala.
  2. Custom DNS records — kalau pakai DNS hosting (Cloudflare), export zone file periodic.
  3. Cron jobs config — screenshot cPanel → Cron Jobs tab quarterly.
  4. SSL private key (kalau pakai cert paid non-Let's Encrypt) — backup di password manager.
  5. Plugin/theme dengan custom config yang tidak di database — beberapa plugin store config di file (e.g., custom .json di plugin folder).

Restore drill — cara test backup

Frequency: quarterly (3 bulan sekali).

Steps:

  1. Provision instance kosong (subdomain di cPanel atau VPS test)
  2. Restore latest backup ke instance kosong
  3. Verify:
    • Homepage load tanpa error
    • Database query work (test login, search, transaction)
    • File integrity (image, custom plugin file)
  4. Catat: berapa lama restore butuh? (5 menit? 30 menit?)
  5. Hapus test instance setelah selesai

Kalau restore gagal atau berhari-hari → backup setup-mu broken, fix sekarang sebelum disaster nyata terjadi.

Common backup mistake

  1. Backup di server yang sama — hosting crash = backup ikut hilang. Selalu offsite.
  2. Backup besar tapi tidak verify — generate file, upload, lupa cek. Verify minimum monthly.
  3. No retention policy — backup lama tidak di-purge, storage explosion → tagihan cloud naik.
  4. Backup encrypted tapi lupa key — kalau backup encrypted, simpan decryption key di tempat terpisah (password manager).
  5. Test restore di production — bisa overwrite data live. SELALU restore ke instance test pertama.

Backup feature di hosting

Banyak hosting (termasuk GoCelerus) sediakan backup otomatis built-in:

  • Daily incremental backup
  • Retention 30 hari minimum
  • One-click restore via dashboard

Bagus sebagai copy 2 (sama datacenter), tapi tetap perlu copy 3 offsite dengan UpdraftPlus / S3.

Jangan rely 100% ke backup provider — kalau akun di-suspend (alasan apapun), kamu mungkin lose access sementara ke backup juga.

Estimasi waktu setup awal

  • WordPress + UpdraftPlus + Google Drive: 15-20 menit
  • Laravel + spatie/backup + S3: 30-45 menit
  • cPanel script + cron + rsync: 45 menit - 1 jam

Sekali setup, jalan otomatis selamanya. Maintenance: 15 menit/quarter untuk restore drill.

Kesimpulan

Backup adalah salah satu hal yang sangat membosankan tapi sangat penting. Aturan 3-2-1 + restore drill quarterly = formula yang battle-tested di industri data engineering.

Setup awal 20-60 menit, save kamu dari nightmare berhari-hari kalau terjadi crash. Investasi waktu paling worth-it di operasi web.

Mulai hari ini. Backup yang akan kamu lakukan minggu depan = backup yang tidak pernah akan kamu lakukan.

Welcome to GoCelerus

Save 15% on any plan

Launch promo — 15% off any plan

Your coupon code

LAUNCH15
Browse plans