Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-29-2010, 10:18 AM
|
#16
|
Member
Registered: Dec 2006
Distribution: Slackware
Posts: 933
|
Quote:
Originally Posted by dinakumar12
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?
|
|
|
09-29-2010, 12:54 PM
|
#17
|
Member
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Original Poster
Rep:
|
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.
|
|
|
09-29-2010, 01:03 PM
|
#18
|
Member
Registered: Dec 2006
Distribution: Slackware
Posts: 933
|
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.
|
|
|
10-07-2010, 02:13 AM
|
#19
|
Member
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Original Poster
Rep:
|
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.
|
|
|
10-07-2010, 04:07 AM
|
#20
|
Member
Registered: Aug 2010
Distribution: Fedora, Centos, Debian
Posts: 49
Rep:
|
It would be better to use find ... -delete instead of find ... -exec rm -rf {} \;
|
|
|
10-11-2010, 01:52 AM
|
#21
|
Member
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Original Poster
Rep:
|
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.
|
|
|
10-13-2010, 01:03 AM
|
#22
|
Member
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Original Poster
Rep:
|
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.
|
|
|
10-13-2010, 01:13 AM
|
#23
|
Member
Registered: Dec 2006
Distribution: Slackware
Posts: 933
|
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.
|
|
|
All times are GMT -5. The time now is 06:21 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|