Protokol rsync remote memungkinkan rsync untuk mentransfer file di koneksi jaringan, memakai algoritma checksum-search efisien ,itu sudah dijelaskan dalam laporan teknis yang ada dalam paket ini.
Oke eksklusif kita mulai saja.
Katakanlah 192.168.1.10 (anduril) yaitu tujuan backup,herugrim adalah hostname host, langkah berikut secara otomatis akan rsync direktori home ke server cadangan.
Langkah-langkah sebgai berikut:
1.Menghasilkan kunci RSA untuk dipakai dengan SSH. Pastikan kata sandi kosong.
shakir@herugrim $ ssh-keygen -t rsa -C shakir@192.168.1.10 Generating public/private rsa key pair. Enter file in which to save the key (/home/shakir/.ssh/id_rsa): /home/shakir/.ssh/id_rsa.192.168.1.10 Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10. Your public key has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10.pub. The key fingerprint is: 11:d9:23:2e:68:05:59:d9:ac:5a:00:69:17:3a:b4:24
shakir@herugrim $ ssh-copy-id -i .ssh/id_rsa.192.168.1.10.pub shakir@192.168.1.10
shakir@herugrim $ ssh shakir@192.168.1.10 -i .ssh/id_rsa.192.168.1.10 shakir@anduril: $
shakir@anduril: $ mkdir backup/herugrim -p
shakir@herugrim $ rsync --verbose --progress --compress --rsh=ssh --recursive --times --perms --links --delete /home/shakir anduril:/home/shakir/backup/herugrim -e "ssh -i /home/shakir/.ssh/id_rsa.192.168.1.10"
Edit entri crontab Anda dengan memakai perintah ini.
crontab -e
30 1 * * * rsync --compress --rsh=ssh --recursive --times --perms --links --delete /home/shakir anduril:/home/shakir/backup/herugrim -e "ssh -i /home/shakir/.ssh/id_rsa.192.168.1.10"
sudo /etc/init.d/cron start #depending on your linux distro
Demikian tutorial tentang Bagaimana melaksanakan backup otomatis di Linux.
Mari berteman dengan saya
Follow my Instagram _yudha58
0 Response to "√ Bagaimana Melaksanakan Backup Otomatis Di Linux"
Posting Komentar