LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-29-2010, 10:18 AM   #16
Chuck56
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 933

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493

Quote:
Originally Posted by dinakumar12 View Post
I have another question,if i need to remove the seven days old database dump,what should be added to the script.
That depends on what script are you using. Did you decide to run rsnapshot or are you using something else?
 
Old 09-29-2010, 12:54 PM   #17
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
Hi,

I used the same script which you have provided only made slight changes to dump my mysql database,as i have poor knowledge in shell scripting.

no i didn't use rsnapshot.i have just edited a file with the script you have given and gave executable permission for that file,and allotted a cron job to run that file once in a day.

Last edited by dinakumar12; 09-29-2010 at 12:59 PM.
 
Old 09-29-2010, 01:03 PM   #18
Chuck56
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 933

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
As I mentioned in my earlier reply, I use the mysql dump script with rsnapshot.

If you choose to use rsnapshot, which is really a package of rsync shell scripts, then backup rotations are handled by automatically. I can help you include the mysql script in rsnapshot.

If you are writing your own scripts then you'll need to post the scripts so we can all help.
 
Old 10-07-2010, 02:13 AM   #19
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
Hi chuck,

Sorry for the delayed reply. I have added this line to the script to delete the seven days old backup.

" find /var/tmp -mtime +6 -daystart -exec rm -rf {} \; "

and it seems to work.

But i followed this link to take incremental backup of my server

http://blog.umeshupreti.com/technica...ckup-with-tar/

but every time when i take incremental backup it backsup all folders, it only omits the files which are not changed but it backs up all the folders.


so is there any way to take incremental back up of both files and folders which have been recently changed before the recent backup.
 
Old 10-07-2010, 04:07 AM   #20
goldenbarb
Member
 
Registered: Aug 2010
Distribution: Fedora, Centos, Debian
Posts: 49

Rep: Reputation: 7
It would be better to use find ... -delete instead of find ... -exec rm -rf {} \;
 
Old 10-11-2010, 01:52 AM   #21
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
Hi all,

is it possible to restore a database using script,it can be mysql or postgresql. if possible how to achieve that.you suggestions would be very helpful.

Thanks in advance,
Dinesh.
 
Old 10-13-2010, 01:03 AM   #22
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
Hi chuck,

I want the scripts to write to a log file every time it runs. so that i can check the log file whether the the script is properly run to generate the backup.

so what should be added to the script.

Thanks in advance,
Dinesh.
 
Old 10-13-2010, 01:13 AM   #23
Chuck56
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 933

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
I use rsnapshot, not tar, to backup. http://www.rsnapshot.org/

rsnapshot uses rsync and hard links to save space. It updates logs files after completion and can send out email as well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Incremental Backup me_spearhead Programming 1 01-09-2009 06:09 AM
incremental backup mahmoud Linux - Newbie 3 11-28-2008 04:31 AM
incremental backup jdeeptir Linux - Newbie 5 05-24-2008 06:51 PM
Incremental backup Ammad Linux - Software 2 02-22-2008 03:41 PM
About incremental backup satimis Linux - Software 0 06-15-2006 04:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration