Rsync Daily Weekly Fully Monthly Backup Incremental Backup

rsync it is backup utility. it is also called Incremental Backup.
Incremental Backup:
1) It will backup of files that's NEW or CHANGED Since Last Backup (or) synchronize file and directory form the one location to another .
2) Use time stamp to compare the files.
3) Copy the file with same permission, Ownership of User, Group and Link.
4) Advantages: It will take the least time.
FULL BACKUP: Complete Backup of everything you want to take backup.

rsync installation in Linux and Unix
Ubunut & Mint Edition
# apt-get install rsync
Linux Redhat centos
#yum install rsync
-a archieve of file
-r recursive of the directory
-v verbose
-z compress file data
-e specify the remote shell to use.
-x Don't Cross the File system.

SYNTAX rsync
#rsync -av [SOURCEFILE] [BACKUPOFSOURCEFILE]
#rsync -av /boot/ /backup

rsync Remote System
maintain the incremental backup from the local system to remote system
$ rsync -v -e ssh /backup/backup.tar.gz root@67.128.1.1:~
maintain the incremental backup form the Remote system to local system using SSh
$ rsync -v -e ssh root@67.128.1.1:~/webroot.txt  /tmp
if we put ‘~’ symbol mean it will paste the document to the home directory of the user
Example
root@67.128.1.1:~/webroot.txt>>Remote host :67.128.1.1 [/root/webroot.txt] CURRENT USER ROOT
rhel5@67.128.1.1:~/webroot.txt >>/home/rhel5/webroot.txt CURRENT USER rhel5

rsync important configuration file
configuration file =/etc/rsyncd.conf
motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock


#rsync -v -e ssh /one root@67.228.6.2:
root@67.228.6.2's password:
skipping directory /one
sent 21 bytes  received 20 bytes  11.71 bytes/sec
total size is 0  speedup is 0.00
We need to mention the option like -ave
Otherwise we will got the error message “skipping directory /one”.

Related post