[SHARE] cPanel WHM Force Backup


Status
Not open for further replies.

Bestariweb Hosting

Hosting Guru
The Warrior
Verified Provider
WHM/cPanel telah menyediakan fasilitas backup melalui menu WHM » Backup » Backup Configuration. Kita bisa memilih daily, weekly, monthly atau tidak memilih sama sekali (disable). Jika anda membutuhkan daily backup, kami sarankan menggunakan incemental backup agar tidak memberatkan server. Namun incremental backup ini memiliki kelemahan yaitu tidak bisa digunakan untuk migrasi ke server lain, dan hanya diperuntukkan untuk kebutuhan restore account.

Cara Force Backup WHM cPanel
Force backup WHM cPanel kadang kita butuhkan disaat kita akan melakukan migrasi server (bukan migrasi account), atau karena satu alasan kita butuh backup itu sekarang juga. Adakah command line di cpanel yang mendukung hal itu?

Backup 1 akun cPanel
Jika kita hanya membutuhkan untuk backup 1 akun cpanel, kita bisa menggunakan perintah berikut:

Code:
/scripts/pkgacct cpanelusername

Perintah di atas akan menghasilkan file backup /home/cpmove-cpanelusername.tar.gz

Contoh hasil dari perintah backup cpanel di atas adalah:

Code:
[root@tutorial-linux home]# /scripts/pkgacct cpusername
[2017-08-05 19:19:46 +0700] pkgacct started.
[2017-08-05 19:19:46 +0700] pkgacct version 10 - user : cpusername - tarball: 1 - target mysql : default - split: 0 - incremental: 0 - homedir: 1 - mailman: 1 - backup: 0 - archive version: 3 - running with uid 0
[2017-08-05 19:19:46 +0700] pkgacct using '/usr/local/cpanel/3rdparty/bin/pigz -6 --processes 1 --blocksize 4096 --rsyncable' to compress archives
[2017-08-05 19:19:56 +0700] pkgacct working dir : /home/cpmove-cpusername
[2017-08-05 19:19:56 +0700] Copying Reseller Config...[2017-08-05 19:19:56 +0700] Done
[2017-08-05 19:19:56 +0700] Copying Suspension Info (if needed)...[2017-08-05 19:19:56 +0700] Done
[2017-08-05 19:19:56 +0700] Copying SSL certificates, CSRs, and keys...[2017-08-05 19:19:56 +0700] Done
[2017-08-05 19:19:56 +0700] Storing SSL domain......[2017-08-05 19:19:56 +0700] Done
[2017-08-05 19:19:56 +0700] Copying Domain Keys....[2017-08-05 19:19:56 +0700] Done
[2017-08-05 19:19:56 +0700] Copying Counter Data....[2017-08-05 19:19:56 +0700] Done
[2017-08-05 19:19:56 +0700] Copying Bandwidth Data....Summary databases … done!
[2017-08-05 19:19:56 +0700] Done
[2017-08-05 19:19:56 +0700] Copying Dns Zones.......linux.tutorials.id...[2017-08-05 19:19:57 +0700] Done
[2017-08-05 19:19:57 +0700] Copying Mail files....[2017-08-05 19:19:57 +0700] Done
[2017-08-05 19:19:57 +0700] Copying proftpd file....[2017-08-05 19:19:57 +0700] Done
[2017-08-05 19:19:57 +0700] Copying www logs.......log file sizes [0 byte(s)]......linux.tutorials.id-bytes_log......linux.tutorials.id-ssl_log......linux.tutorials.id...[2017-08-05 19:19:57 +0700] Done
[2017-08-05 19:19:57 +0700] Copy userdata...[2017-08-05 19:19:57 +0700] Done
[2017-08-05 19:19:57 +0700] Copy custom virtualhost templates...[2017-08-05 19:19:57 +0700] Done
[2017-08-05 19:19:57 +0700] Copying mailman lists and archives....[2017-08-05 19:19:57 +0700] Done copying mailman lists and archives.
[2017-08-05 19:19:57 +0700] Copying homedir.............
[2017-08-05 19:19:58 +0700] Done
[2017-08-05 19:19:58 +0700] Fixing up EA4 .htaccess blocks: /home/cpusername/public_html/.htaccess  Done.
[2017-08-05 19:19:58 +0700] Calculating nobody files............
[2017-08-05 19:19:59 +0700] Done
[2017-08-05 19:19:59 +0700] Performing “Postgresql” component....
[2017-08-05 19:19:59 +0700] Completed “Postgresql” component.
[2017-08-05 19:19:59 +0700] Performing “Mysql” component....
[2017-08-05 19:19:59 +0700] Determining mysql dbs...[2017-08-05 19:19:59 +0700] ...mysqldump version: 5.6.35...[2017-08-05 19:19:59 +0700] ...mysql version: 5.6...[2017-08-05 19:19:59 +0700] Saving mysql privs...[2017-08-05 19:19:59 +0700] Done
[2017-08-05 19:19:59 +0700] ...Done
[2017-08-05 19:19:59 +0700] Storing mysql dbs............
cpusername_wp123[2017-08-05 19:20:00 +0700] (6475273 bytes)
[2017-08-05 19:20:00 +0700] ...Done
[2017-08-05 19:20:00 +0700] Completed “Mysql” component.
[2017-08-05 19:20:00 +0700] Copying cpuser file.......[2017-08-05 19:20:00 +0700] Done
[2017-08-05 19:20:00 +0700] Copying crontab file.......[2017-08-05 19:20:00 +0700] Done
[2017-08-05 19:20:00 +0700] Performing “Quota” component....
[2017-08-05 19:20:00 +0700] Completed “Quota” component.
[2017-08-05 19:20:00 +0700] Performing “Integration” component....
[2017-08-05 19:20:00 +0700] Completed “Integration” component.
[2017-08-05 19:20:00 +0700] Performing “AuthnLinks” component....
[2017-08-05 19:20:00 +0700] Completed “AuthnLinks” component.
[2017-08-05 19:20:00 +0700] Performing “APITokens” component....
[2017-08-05 19:20:00 +0700] Completed “APITokens” component.
[2017-08-05 19:20:00 +0700] Storing Subdomains....
[2017-08-05 19:20:00 +0700] Done
[2017-08-05 19:20:00 +0700] Storing Parked Domains....
[2017-08-05 19:20:00 +0700] Done
[2017-08-05 19:20:00 +0700] Storing Addon Domains....
[2017-08-05 19:20:00 +0700] Copying password.......[2017-08-05 19:20:00 +0700] Done
[2017-08-05 19:20:00 +0700] Copying shell.......[2017-08-05 19:20:00 +0700] Done
[2017-08-05 19:20:00 +0700] Creating Archive ....................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
[2017-08-05 19:21:27 +0700] Done
[2017-08-05 19:21:27 +0700] pkgacctfile is: /home/cpmove-cpusername.tar.gz
[2017-08-05 19:21:29 +0700] md5sum is: 74159d3dd53d242a62a4d66344086542
[2017-08-05 19:21:29 +0700]
[2017-08-05 19:21:29 +0700] size is: 367430657
[2017-08-05 19:21:29 +0700]
[2017-08-05 19:21:29 +0700] homesize is: 498421760
[2017-08-05 19:21:29 +0700]
[2017-08-05 19:21:29 +0700] homefiles is: 17298
[2017-08-05 19:21:29 +0700] pkgacct completed

Backup seluruh akun WHM
Untuk melakukan force backup seluruh akun WHM cPanel, sebelumnya kita harus enable backup di menu WHM » Backup » Backup Configuration.

Kemudian ketik perintah dibawah ini:

Code:
/usr/local/cpanel/bin/backup --force
Perintah diatas akan dieksekusi secara backgound dan bisa dipantau melalui perintah tail -f logfile

Hasil backup akan di simpan di /backup-path/yyyy-mm-dd
dimana yyyy-mm-dd adalah tanggal saat script tersebut dieksekusi.

Sumber: https://linux.tutorials.id/cara-force-backup-di-whm-cpanel/

Semoga bermanfaat
 
Status
Not open for further replies.

Top