Linux – Backup Data

, <span>Linux – Backup Data</span>, KandZ

Basic ways to backup data are two, using cp and rsync. rsync is more efficient because it checks if the file being copied already exists. If the file exists then it check if is there any change in size or modification time. If there is no change at all then rsync skip copying this file. An other rsync advantage is that rsync copies only the part of the file that has been changed. All those make rsync better and faster way to backup your data than cp.

cp can copy only files to and from destinations on the local machine, unless you have mounted a filesystem using NFS.

cp /home/user/* /home/backup

rsync can be used to copy files to/from other machine but it also copies files/directories locally.

rsync -r /root/importat /var/backup     #will copy the files to /var/backup in local machine

rsync -r /root/importat root@  # will copy the file to remote machine with ip address

rsync -r root@ /root/importat # will copy from remote to local machine


21180cookie-checkLinux – Backup DataLinux – Backup Data

Related posts

Leave a Comment