Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to take incremental and partial backup through TAR in RHEL 5 without overwriting the existing one?

user-image
Question ajoutée par mohsin Butt , IT Operations and Support Executive , Bahria Enterprise Systems and Technologies
Date de publication: 2013/08/03
Utilisateur supprimé
par Utilisateur supprimé

example command : rsync -axW -e 'ssh -c blowfish' *.tar.gz :/root/ --timeout=0 other one if you do not have time to write your own bash script to do that check this one: http://bash.cyberciti.biz/backup/tar-full-incremental-tape-backup-script/

Tawfek Daghistani
par Tawfek Daghistani , Senior Developer , jamalon

Hello Mohsin , usually I backup my files using rsync example command : rsync -axW -e 'ssh -c blowfish' *.tar.gz :/root/ --timeout=0

Mohamad Rahsad
par Mohamad Rahsad , Founder and Service Manager , Teqnia

The most easy way is by add the date as part of you backup file name, to backup a file or folder I'll make the backup file named something like this my_bakcup_file_`date +%Y-%m-%d_%H-%M-%S`_.tar.gz

Athanassios Staveris-Polykalas
par Athanassios Staveris-Polykalas , Secretary General of Telecommunications and Post - Hellenic Republic , General Secretariat of Telecommunications and Post - Hellenic Republic

Hi Mohsin , you actually need to right a script doing that which you can schedule it from a cron job.
Within the script you can give names to backup files per day or hour or whenever you want to back them up.
if you do not have time to write your own bash script to do that check this one: http://bash.cyberciti.biz/backup/tar-full-incremental-tape-backup-script/ it can really help you and you can modify it according to your needs.
let me know if you need any assistance Thanassis

Utilisateur supprimé
par Utilisateur supprimé

If we are using enterprise backup we can schedule incremental backup through mysql enterprise backup utility or else rsync could be used.
If we are adding files to already made tar we need to use " tar rvf " switch to add files.

Panagiotis Groidis
par Panagiotis Groidis , Sr. Systems Engineer , ABC Professional Services Computer Troubleshooters

First , we need to know what kind of DATA you need to backup , how large are they, and what kind of media you have to store the backups.
After that we need to determine for each backup method how much time needing for a backup to be completed.
Most Admins start with a simple question, "Do i need incremential backup ? Differential ? or Full?" In my case one of my client has lost a lot of files because they wanted incremential backup, after that they changed to combined solution with Differential and Full Version.
For start you need to know which type of backup suites best for you , and then to choose the technology and the media storage.
Read more about there for start, https://help.ubuntu.com/community/BackupYourSystem , and there http://backup-exec.helpmax.net/en/preparing-for-backup/how-to-choose-a-backup-strategy/ Also take this examples , as good resource , http://www.faqs.org/docs/securing/chap29sec306.html   Remember you have to be VERY carefull when you design your backup Strategy! Good luck

Utilisateur supprimé
par Utilisateur supprimé

Salam Mohsin, 

 

Sorry for getting back so late on this issue.. for that purpose you can use the tar , dar command along with diff command to verify the overwriting.. 

 

Although you wont find much of difference in tar and rsync command. 

 

 

echo '----- Backup Started '`date` >>/root/backup/backuperrors.txt

tar -zcvf /media/a9f299d7-fcbc28b3f3c0/user-host`date '+%d-%B-%Y'`.tar.gz /etc /root /home2>> /root/backup/backuperrors.txt

 

but if you want to achieve incremental even decremental backup then my recommandation is dar. 

 

check man pages on this. or read following url. :)

 

http://en.wikipedia.org/wiki/Dar_(disk_archiver)

 

 

Faheem Ponnambath Adbul
par Faheem Ponnambath Adbul , Infrastructure Development Engineer - Linux , RM Education

Hello Mohsin, Use rsync instead of tar.
Just write down a simple bash script to automate this and set a cronjob.
Cheers, Faheem.

Utilisateur supprimé
par Utilisateur supprimé

Hi Moshin, I'm using rsync as my incremental backup.
If you want a scheduled backup, you have to build a script in a cron job.
http://anouar.im/2011/12/how-to-backup-with-rsync-tar-gpg-on-osx.html#.Uf4Q2GQpZRg This will help you understand the concept of backup using rsync, tar, cron and gpg (for encrypting backups) I hope this will help you.

KASHIF ZEESHAN
par KASHIF ZEESHAN , Corporate Trainer , ORION EDUTECH PVT LTD

Sorry I Don't have expertise on backup programming.

More Questions Like This