Backup Data Dengan Rsync

Buat file backup dengan ekstensi .sh:
#vi backup_data.sh

Isi file:
#!/bin/bash
cd /opt/hostname/
mkdir backup_hostname_$(date +%Y%m%d)
rsync -artuvb --backup-dir='/opt/hostname/backup_hostname_'$(date +%Y%m%d)'/' --suffix=_$(date +%Y%m%d) --exclude-from='/opt/exclude_hostname.txt' -e ssh root@hostname:/dir_hostname /opt/hostname/

Share on Google Plus

About Admin

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments: