#Welcome to Nehra Classes RU-vid Channel#
#Automate Backup Using rsync & crontab in Linux#
============================================
rsync or remote synchronization is a software utility for Unix-Like systems that efficiently sync files and directories between two hosts or machines.
One of them being the source or the local-host from which the files will be synced, the other one being the remote-host, on which synchronization will take place.
There are basically two ways in which rsync can copy/sync data:
Copying/syncing to/from another host over any remote shell like ssh, rsh.
Copying/Syncing through rsync daemon using TCP.
============================================
Server: (192.168.1.111)
yum repolist
rpm -qa | grep rsync
yum install rsync -y
rpm -qi rsync
su - vikasnehra
mkdir backup
cd backup
touch test{1..10}.txt
mkdir -p /tmp/backup
rsync --help
rsync -v /home/vikasnehra/backup/* /tmp/backup/
exit
mkdir -p /backupsource/
cd /backupsource/ ; touch test{1..10}.txt
CLIENT: (192.168.1.108)
yum repolist
rpm -qa | grep rsync
yum install rsync -y
mkdir -p /backupdestination/
Go To SERVER:
rsync -av -e ssh /backupsource/ root@192.168.1.108:/backupdestination/
Go To CLIENT:
cd /backupdestination/
ls -lha
rm -rf *
ls -lha /root/.ssh/
mkdir -p /root/.ssh/
chmod 700 /root/.ssh/
touch /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
Go To SERVER:
ssh-keygen
scp -r /root/.ssh/id_rsa.pub root@192.168.1.108:/root/.ssh/authorized_keys
date
crontab -e
25 20 * * * bash /root/backup.sh
vim /root/backup.sh
!#/bin/bash
/usr/bin/rsync -av -e ssh /backupsource/ root@192.168.1.108:/backupdestination/
crontab -l
tail -f /var/log/cron
Go To CLIENT:
ll /backupdestination/
===
Thanks for watching the video. If it helped you then, please do like & share it with others as well. Feel free to post your queries & suggestions, we will be glad to answer your queries.
If you like our hard work then do subscribe to our channel & turn on the bell notification for latest updates.
===
Our Some Popular Videos:
Yum Server RHEL 7:
• Configure Local Yum Re...
DNF/Yum Server RHEL 8:
• Configure Local DNF / ...
Puppet Configuration:
• Install and Configure ...
Startis File System in RHEL 8:
• Stratis Feature in RHE...
Concept of All RAID Levels:
• Session-31 | Concept o...
Configure RAID-0 in Linux:
• Live Linux Training (R...
Configure RAID-1 in Linux:
• Live Linux Training (R...
Configure RAID-5 in Linux:
• Live Linux Training (R...
Configure RAID-6 in Linux:
• Live Linux Training (R...
Configure RAID-10 in Linux:
• Live Linux Training (R...
Migrate LVM:
• Migrate Logical Volume...
LVM Snapshot:
• Session-30 | Logical V...
===
Contact Us:
Vikas Nehra's Twitter Handle:👇
bit.ly/VikasNehraTwitterHandle
Registration:👇
bit.ly/NehraClassesRegForm
Twitter Handle:👇
bit.ly/NehraClassesTwiiterHandle
Facebook Page:👇
nehraclasses
Instagram:👇
/ nehraclasses
Webpage:👇
bit.ly/NehraClassesWebpage
Telegram Channel: 👇
t.me/NehraClasses
WhatsApp Us: 👇
bit.ly/2Kpqp5z
Email Us:👇
Email: nehraclasses@gmail.com
===
©COPYRIGHT. ALL RIGHTS RESERVED.
2 авг 2024