[code:1:722d8a25c1]#!/bin/bash
# config ---------------------------------
# two methods
# from = receive data from another server
# to = send data to another server
rsync_method=from
rsync_ip='192.168.5.18'
local_dir='/home/backupguy/backups'
remote_dir='/home/backup'
free_space_bin='/home/backups/freediskspace.sh'
# config end ------------------------------
if [ '$rsync_method' == 'to' ]; then
rsync -ur --progress $local_dir/* $remote_account_name@$rsync_ip:$remote_dir
else
rsync -ur --progress $remote_account_name@$rsync_ip:$remote_dir/* $local_dir
fi
# free disk space
$free_space_bin
[/code:1:722d8a25c1]
rsync, bash, scriptrsync, bin, config, methods, server, rsync_method, rsync_ip, local_dir, backupguy, backups, remote_dir, free_space_bin, freediskspace, sh, ur, remote_account_name, fi, disk,