GoBackup: Solusi Backup Otomatis untuk Database dan File

GoBackup: Solusi Backup Otomatis untuk Database dan File

Tools CLI open-source yang dapat anda digunakan untuk melakukan backup otomatis pada database dan file penting lainya. dengan integrasi cloud storage seperti Amazon S3, FTP, dan Google Drive serta dapat di integrasikan dengan notifikasi seperti slack, discord, mattermost, email dan lainya.

Contents

Kenapa Menggunakan GoBackup?

  • Multi-Database Support: Mendukung PostgreSQL, MySQL, Redis, MongoDB, dan lainnya.
  • Notifikasi: Mendukung integrasi notifikasi seperti slack, discord, email, mattermost chat dan lainnya.
  • Enkripsi dan Kompresi: Menjaga keamanan dan efisiensi penyimpanan backup.
  • Automasi Mudah: Bisa dijadwalkan menggunakan cron job.
  • Dukungan Cloud Storage: Backup ke S3, FTP, SCP, dan berbagai penyimpanan lainnya.

Instalasi Tools Gobackup

Ikuti panduan berikut ini untuk instalasi Gobackup pada Sistem Operasi Linux dan MacOS.

Instalasi Gobackup di Linux menggunakan curl

Jalankan perintah berikut untuk install gobackup di Linux.

Bash

curl -sSL  | sh

Instalasi GoBackup di MacOS menggunakan Homebrew

Sebelum instalasi gobackup, pastikan anda sudah menginstall Homebrew package manager.

Jalankan perintah berikut ini untuk instalasi gobackup di MacOS.

Bash

brew install gobackup

Setelah berhasil di install, lokasi binari gobackup berada di /usr/local/bin/gobackup, dan anda dapat menjalan perintah gobackup.

Verifikasi versi dengan menjalankan perintah berikut:

Konfigurasi GoBackup

Buat file konfigurasi nano ~/.gobackup/gobackup.yml dengan format yml.

Gobackup database postgreSQL

Berikut adalah contoh konfigurasi backup database PostgreSQL yang terintegrasi dengan DigitalOcean Space dan mengirim notifikasi backup ke Slack chat.

Gobackup menggunakan tools utility pg_dump untuk melakukan dump database dengan format .sql

Jika belum ada PostgreSQL client, and perlu install terlebih dahulu menggunakan perintah berikut.

Bash

sudo apt update && sudo apt install postgresql-client -y

Kemudian edit konfigurasi mengikuti contoh berikut:

YAML

 models:
  database_model:
    databases:
      MyPostgreSQL:
        type: postgresql
        host: 127.0.0.1
        port: 5432
        database: MyDatabase
        username: MyUserName
        password: MyPassword
        args: --no-owner --no-acl --no-privileges # Extra argumen
    compress_with:
      type: tgz
    notifiers:
      slack:
        type: slack
        url: 
        on_success: true
        on_failure: true
    storages:
      cloud_s3:
        type: spaces
        keep: 7
        bucket: MyBucket
        region: REGION_DO_SPACES
        path: database-backup/
        access_key_id: YOUR_ACCESS_KEY_IDC
        secret_access_key: YOUR_SECRET_ACCESS_KEY

Paramater konfigurasi backup database PostgreSQL:

  • host– HOST/IP Address Database.
  • port– Port Database PostgreSQL.
  • database– Nama Database.
  • username– Username Database.
  • password– Katasandi Database.
  • args– Tambahan argumen sesuai yang diinginkan.

Konfigurasi Gobackup Multiple Database

Berikut adalah contoh konfigurasi backup multiple database PostgreSQL, Mysql, Redis, MongoDB.

Bash

sudo apt update && sudo apt install postgresql-client mysql-client  -y

Kemudian isi dengan konten dibawah ini.

YAML

models:
  database_model:
    databases:
      postgresql_database:
        type: postgresql
        host: 127.0.0.1
        port: 5432
        database: my_production_database
        username: MyUserName
        password: MyPassword
        args: --no-owner --no-acl --no-privileges # Extra argumen
      mysql_database:
        type: mysql
        host: 127.0.0.1
        port: 3306
        database: my_production_database
        username: root
        password: root
        args: --single-transaction --quick
      mongodb_database:
        type: mongodb
        host: 127.0.0.1
        port: 27017
        database: my_production_database
        username: root
        password: root
        oplog: true
        exclude_tables:
          - my_collection_1
          - my_collection_2
        args: --gzip --dumpDbUsersAndRoles
      redis_database:
        type: redis
        mode: sync
        rdb_path: /var/db/redis/dump.rdb
        invoke_save: true
        password: My_Passwords
        args: --tls --cacert redis_ca.pem
    compress_with:
      type: tgz
    notifiers:
      slack:
        type: slack
        url: 
        on_success: true
        on_failure: true
    storages:
      cloud_s3:
        type: spaces
        keep: 7
        bucket: MyBucket
        region: sgp1
        path: database-backup/
        access_key_id: YOUR_ACCESS_KEY_IDC
        secret_access_key: YOUR_SECRET_ACCESS_KEY

Menjalankan gobackup secara manual.

Output Log:

Tools backup management dengan Gobackup

Contoh hasil backup adalah 2025.03.15.21.25.09.tar.gz dengan format tahun.bulan.tanggal.menit.detik.tar.gz

Automasi Gobackup dengan Cronjob

Buat cronjob scheduler, agar proses backup berjalan secara otomatis dan sesuaikan waktu backup yang anda inginkan.

Tambahkan baris berikut untuk menjalankan backup setiap hari pukul 1 pagi:

Bash

0 1 * * * /usr/local/bin/gobackup perform >> /var/log/gobackup.log 2>&1

Kesimpulan:
GoBackup adalah solusi praktis untuk backup database dan file penting anda secara otomatis. Dengan dukungan berbagai jenis database, cloud storage dan notifier.

Referensi:

PakarPBN

A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.

In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.

The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.

Jasa Backlink

Download Anime Batch

Comments

No comments yet. Why don’t you start the discussion?

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *