Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

backup of database in automatically particular time

backup of database in automatically particular time

 
Post new topic   Reply to topic     Forum Index -> Linux os
View previous topic :: View next topic  
Author Message
juniormember



Joined: 28 Jun 2008
Posts: 154

PostPosted: Sun Oct 12, 2008 7:26 am    Post subject: backup of database in automatically particular time Reply with quote

Hi,

I want to take mysql database backup automatically in linux. In window, we have scheduler and run at our predefine time automatically to take backup of system and other application. Same thing i want to use in linux. I want to take daily database backup and copy web root folder files to other backup system for security purpose. But i have to do it manually daily and everyday. If anybody have done this synchronized schedule backup system in linux please help me.
Back to top
View user's profile Send private message
seniormember
Site Admin


Joined: 20 Jul 2008
Posts: 77

PostPosted: Sun Oct 12, 2008 8:00 am    Post subject: Reply with quote

Linux also provide easy and good backup schedule system facilities. Linux provide both manual backup and automatic backup system. In manual bakup system you have to take backup when you need backup and execute by running command or shell script.
1. at automatic task
2. cron automatic task scheduler

at is something like manual backup system. in which you need to define task or command to execute at particular time. e.g

Quote:
# at 13:30
at> backup mysql command
at> copy web root file to other server command
at><ctrl+d>


like this we can define many task to execute at particular date and time
Quote:
# at 13:30 1/25/09
at>sh backup.sh
at> copy web root file to other server command
at><ctrl+d>

run at January 25 of 2009

But most popular backup system in linux is cron

make backup.sh file in / directory and copy this commands

Code:

mysqldump -u root database > /backup`date +'%d-%m-%Y'`.sql
zip /backup`date +'%d-%m-%Y'`.zip /backup`date +'%d-%m-%Y'`.sql
rm -f /backup`date +'%d-%m-%Y'`.sql


save and allow permissions to this backup.sh to execute.

Quote:
#crontab -e
15 14 * * * /backup.sh


It will open in vi editor default editor.
it will schedule to every year every month every week to 2 pm at 15 min run this backup.sh script. Save this back file with date and format of sql.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Linux os All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack