Тёмный

Automate Backup in Linux Using RSYNC & Crontab | Backup Data On Remote Server Using RSYNC 

Nehra Classes
Подписаться 47 тыс.
Просмотров 33 тыс.
50% 1

#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

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 87   
@PavanM-rm5yh
@PavanM-rm5yh 3 года назад
such a great video sir... very clear explanation... Thanks for sharing :)
@NehraClasses
@NehraClasses 3 года назад
Thanks a lot 🙏🙏
@sautamghosh9411
@sautamghosh9411 2 года назад
Great video rsync cron and basic shell script combination was great. Extremely helpful for newbies
@harispalegar6806
@harispalegar6806 3 года назад
Very nice explanation sir. And It is most important task in Any organization..
@mithuntechnologies4220
@mithuntechnologies4220 2 года назад
very good explanation. easy to understand
@anujnehra7522
@anujnehra7522 4 года назад
nice video. all the support karo Bhaiyo
@amarsavalgi6767
@amarsavalgi6767 Год назад
Love the the way you make things simple..
@shaikaisha6657
@shaikaisha6657 3 года назад
Crystal clear explanation Nehra g i wish u were in our organization ! Keep ur great work going
@NehraClasses
@NehraClasses 3 года назад
Thanks 🙏
@magui2277
@magui2277 2 года назад
dude has his own clothing line, epic. so many colors to choose from...
@CipherOne
@CipherOne Год назад
Thank you Nehra, great content, my friend!
@NehraClasses
@NehraClasses Год назад
My pleasure 😊
@sachinbanhot8946
@sachinbanhot8946 3 года назад
Nice explanation sir
@NehraClasses
@NehraClasses 3 года назад
Thanks
@munnasarkar6262
@munnasarkar6262 2 года назад
Your video is great
@nftechinformation8040
@nftechinformation8040 2 года назад
awesome yaar . thanks .. gt :)
@abdulqadirbabagana4834
@abdulqadirbabagana4834 2 года назад
Nice video.. Weldone, now remains to setup md5 checksum to confirm source and destination files, if not same.. To initiate synchronization again
@NehraClasses
@NehraClasses 2 года назад
Thanks
@decoder6878
@decoder6878 3 года назад
Very good video
@NehraClasses
@NehraClasses 3 года назад
Thanks
@taran1985
@taran1985 2 года назад
great !!
@AbhaySingh-de1uq
@AbhaySingh-de1uq 3 года назад
Bahut badhiya Vikas
@NehraClasses
@NehraClasses 3 года назад
Thanks 👍
@sandeep24march
@sandeep24march 3 года назад
Great video and great insight into in depth knowledge of data backup, can we do the real time sync for any file changed and can be synced for backup possibilities. Also is it possible to make the versioning of files, same like they are in the Google backup utility?
@NehraClasses
@NehraClasses 3 года назад
Yes we can
@balaji276
@balaji276 2 года назад
Thanks
@NehraClasses
@NehraClasses 2 года назад
Welcome
@TMD21Apr09
@TMD21Apr09 Год назад
Love it. How to do it in an Organisation when you have thousands of servers?
@NehraClasses
@NehraClasses Год назад
There we prefer backup solution tools
@Gamma_Wale
@Gamma_Wale 2 года назад
sir like windows if our os is crashed, so we can recover files from c drive but in linux how we will do that
@NehraClasses
@NehraClasses 2 года назад
We do it from same iso image from where we did the installation. Please watch our rescue kernel videos
@Gamma_Wale
@Gamma_Wale 2 года назад
@@NehraClasses Okay sir i am trying..Thank you!
@arunthakur1708
@arunthakur1708 Год назад
. You made it so elude.
@hasanulbanna2490
@hasanulbanna2490 3 года назад
This can use to copy 10GB files to backup server everyday.?
@NehraClasses
@NehraClasses 3 года назад
Yes, why not.
@sekharchandra9075
@sekharchandra9075 3 года назад
Hi Sir, Could you please provide me with the knowledge on what is "migrating IP from old to new host" and what happens if we do this? Thanks Chandra
@NehraClasses
@NehraClasses 3 года назад
For better support you are requested to join our channel membership and join our telegram channel for the same.
@user-zd8ll5ml4i
@user-zd8ll5ml4i 10 месяцев назад
hi am getting permission denied while giving command > rsync -av -e ssh....... what to do ?
@rajeshgoura2466
@rajeshgoura2466 6 месяцев назад
same problem
@rishipareek4522
@rishipareek4522 Год назад
hello sir , how to remove the files after transfer automatically from the source machine
@rampanwar1316
@rampanwar1316 4 года назад
Sir it will be overnight on next auto rsync ?
@NehraClasses
@NehraClasses 4 года назад
No, it will automatically create the backup for new files.
@vetriforward6819
@vetriforward6819 3 года назад
hello sir, can i run this same in the ubuntu also?
@NehraClasses
@NehraClasses 3 года назад
Yes you can, make sure that rsync package is installed there.
@winecountrygames1859
@winecountrygames1859 2 года назад
how to do this to upload to the cloud? automatically move files to the cloud
@NehraClasses
@NehraClasses 2 года назад
Same procedure
@hasanulbanna2490
@hasanulbanna2490 3 года назад
Possible with mysql database.?
@NehraClasses
@NehraClasses 3 года назад
This method can be used for all type of files.
@genghiskha10Century
@genghiskha10Century 3 года назад
How to copy symlink files ? from a server to a pendrive ?
@NehraClasses
@NehraClasses 3 года назад
Use SCP command to copy files to your local system then copy them to your pen drive by running cp command.
@RakeshBitling
@RakeshBitling 3 года назад
How to connect remote file path and copy those same at current location Linux machine
@NehraClasses
@NehraClasses 3 года назад
Can u please elaborate? For better support please join our telegram channel 🙏
@abhishekarya7915
@abhishekarya7915 5 месяцев назад
sir did you install rhel8 os image or rhel8 server image?
@NehraClasses
@NehraClasses 5 месяцев назад
there is no such thing in case of Redhat OS, it depends on which option you select while doing the installation.
@abhishekarya7915
@abhishekarya7915 5 месяцев назад
@@NehraClasses sir i just select linux version thats all . Is there server option available while selecting.
@NehraClasses
@NehraClasses 5 месяцев назад
Kindly follow our RHCSA playlist in the same order
@abhishekarya7915
@abhishekarya7915 5 месяцев назад
@@NehraClasses ok sir, i aaked because i want to host nodejs application on my local rhel not on cloud.I got confused as we have windows 10, 11 aa os and windows server 2019 and windows server 2022 which cloud platforms are using .Thats why i asked if there is difference there in os image and server.
@ebrahimqazi5963
@ebrahimqazi5963 3 года назад
In actual industry is backup taken the same way
@NehraClasses
@NehraClasses 3 года назад
In industry backup tools such as TSM, Symantec etc are used. While you use this method for backup.
@sohelkhan77000
@sohelkhan77000 2 года назад
How to back up file from Linux to windows machine using wsl need detailed steps 🙏
@NehraClasses
@NehraClasses 2 года назад
We will create the tutorial on this after completing our ongoing training.
@munnasarkar6262
@munnasarkar6262 2 года назад
Please guide sir to crack Linux interview
@techdeep7773
@techdeep7773 2 года назад
Sir how to stop this auto backup
@NehraClasses
@NehraClasses 2 года назад
remove the script from crontab.
@9987366541
@9987366541 3 года назад
Hello sir Same process i have followed with Ubuntu 20 but did not run Crontab , i did not find rsync in usr/bin Please help
@NehraClasses
@NehraClasses 3 года назад
Check the location of crontab using whereis command.
@9987366541
@9987366541 3 года назад
@@NehraClasses Sir when i try to to copy id_rsa.pub to destination server . it gives me this error "scp: /root/.ssh/authorized_keys/: Is a directory" even i have created dir (.ssh/authorized_keys) with full permissions
@NehraClasses
@NehraClasses 3 года назад
Provide us error screenshot in telegram
@9987366541
@9987366541 3 года назад
@@NehraClasses okay ..telegram channel name ?
@NehraClasses
@NehraClasses 3 года назад
Obviously Nehra Classes
@manmohan7750
@manmohan7750 2 года назад
Hi sir how to delete old data after 5days How to write in same script after backup and than delete old data which is last 5days
@NehraClasses
@NehraClasses 2 года назад
Please contact us in our telegram channel
@manmohan7750
@manmohan7750 2 года назад
It's is same name sir
@NehraClasses
@NehraClasses 2 года назад
Yes, please provide us the detailed information regarding the task.
@manmohan7750
@manmohan7750 2 года назад
Sir I found two groups
@manmohan7750
@manmohan7750 2 года назад
Which one 724 subscribers or 411 members
@amirsohail1704
@amirsohail1704 Год назад
Sir please tell me Hindi video
@NehraClasses
@NehraClasses Год назад
please follow our hindi playlist
@naziyashaikh2237
@naziyashaikh2237 3 года назад
error showing : connection refused
@NehraClasses
@NehraClasses 3 года назад
You might have missed any steps
@naziyashaikh2237
@naziyashaikh2237 3 года назад
@@NehraClasses no sir, it is working within network
@naziyashaikh2237
@naziyashaikh2237 3 года назад
@@NehraClasses outside network nhi hora
@NehraClasses
@NehraClasses 3 года назад
What are your requirements
@naziyashaikh2237
@naziyashaikh2237 3 года назад
@@NehraClasses i have to make backup on another machine(located far away) using ip
Далее
Backing up a Linux Server with rsync
12:21
Просмотров 61 тыс.
Learning Awk Is Essential For Linux Users
20:02
Просмотров 291 тыс.
Linux Backup with TAR and Cron Jobs
35:33
Просмотров 249 тыс.