Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6924913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:43:23+00:00 2026-05-27T10:43:23+00:00

I just created my very first PHP/MySQL site and was looking into creating a

  • 0

I just created my very first PHP/MySQL site and was looking into creating a mirror of the db for backup. This is of course, in case some hacker manages to go snooping and wrecks the main db. Is there a right or wrong way of doing this?

Edit: Yes, I have a hosting plan in some other host that I’d like the mirror to be placed in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:43:23+00:00Added an answer on May 27, 2026 at 10:43 am

    There are mainly two ways for backing up your mysql databases: cold(static/offline) backup & hot(dynamic/online) backup.

    1 Using a crontab script backup your db every day/week/month, etc. We call it cold backup. The script maybe like this:

    !#/bin/sh
    mysqldump -usample_name -S/tmp/sample.sock --databases db1 db2 > db_backup_time.sql
    

    you can find manual of mysqldump here. Actually, the whole chp.6 is talking about database backup and recovery. After this, you’ll get the mirror of your data(eg. 6am.) every day.

    2 Using mysql replication solutions(master-slave structure) for online backup. All the queries on master leading to data modifications will also performed on slave.

    comparation:

    Basicly, cold backup is easier. But when bad things happen, first method can only recover the data to the time you dumping the mirror. With hot backup and mysqldump tool, you can recover the data to anytime.

    In my experience, we always compose these two methods together:

    1. write mirror every morning, and,
    2. build a slave of master db on another physical machine.

    that would be safe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am busy creating my very first Facebook application, and although I have PHP
First of all, this question is in regards to PHP and MySQL I have
Just created a WSS site with a some custom web-parts. But I get an
Just created an acc on SO to ask this :) Assuming this simplified example:
I just created a project so my Solution Explorer looks like this: (source: kalleload.net
I just created a user control. This control also makes use of my static
I just created a PHP page that spits outs some data from my database
I am just trying to have an action view display the very first time
This is going to take a bit to explain. I'm creating my first real-world
I am very new to Github. I just created one github account and it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.