Day: September 24, 2021

Rsync backup client

Rsync backup client

Rsync backup command can be used as below.

rsync -avR --delete
        --backup-dir=/folder-`date +%Y.%m.%d` \
        --password-file=/root/password_file \
        --exclude-from='exclude-list.txt' \
        /app \
        /usr/local/share/ca-certificates/ \
        /etc/network/interfaces \
        /etc/NetworkManager/system-connections/ \
        /root \
        /home \
        rsync@server::NetBackup/folder

The password_file only contains rsync password without any other data.

In rsync@server::NetBackup/folder, rsync is user id, server is rsync server, NetBackup is rsync service (share folder), folder is where backup to be saved.

The backup-dir is the folder created in the rsync server to save changes.