Good just to resync files:
rsync -avz --no-perms --no-owner --no-group
Tag Archives: rsync
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
sending incremental file list
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Fix. Make sure if destination folder exists on remote server
rsnapshot exclude by size
rsync_long_args- -max-size=1000m
rsync port
rsync -avz -e 'ssh -p 1111' /resource/path/ [email protected]:/destination/path/
rsync error: protocol incompatibility (code 2) at compat.c(171) [sender=3.0.6]
If you have this kind of error:
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
protocol version mismatch — is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(171) [sender=3.0.6]
Fix.
vi /root/.bashrc
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
monitor rsync progress
strace -e open $(ps -o lwp= -LC rsync | sed ‘s/^/-p/’)
lsof -ad3-999 -c rsync
create rsync incremental backups with hardlinking
Quite short and simple bash script:
#!/bin/bash
# Simple weekly bash backup script all variables explain themselves
# Version 1.03
what=”/ka”
where=”/ba”
set -e
today=$(date +’%Y-%m-%d’)
last=$(ls -r $where | head -1)
delete=$(ls -r $where | tail -n +7)
cd $where
nice -n 19 rsync –bwlimit=10000 –info=progress2 –link-dest=$where/$last $what $where/$today
[ -z “$delete” ] || rm -rf $delete
rsync full backup
rsync -aAXv /* /destination --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found}