SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best Automated Backup Solution?

    Im tryin to figure out the best way to Backup a MySQL and the FTP for a site if possible.. some solutions backup but to the FTP of the site and that doesnt seem to safe .. what options do I have? I have about 20 sites I would like to automatically backup to another location in case there is a problem with the site so it can be easily restored.. any suggestions?

  2. #2
    Visible Ninja bronze trophy
    JeffWalden's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,709
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    For me I have a cron job that performs a database dump and saves the .sql file to the local file system. On regular intervals I have a scheduled FTP job that moves this .sql file from the local server file system to a remote server for backup.
    TAKE A WALK OUTSIDE YOUR MIND.

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hyperbolik View Post
    For me I have a cron job that performs a database dump and saves the .sql file to the local file system. On regular intervals I have a scheduled FTP job that moves this .sql file from the local server file system to a remote server for backup.
    this looks like a great solution.. is this custom or is there somewhere i can find somethin like this?

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I do the same, but with mysqldump and scp instead of FTP. The main difference is that SCP is secure and doesn't involve sending your passwords and your data over a network in plain text.

    It's just a two line bash script, with a few more lines to do rotating dated backups.

  5. #5
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    I do the same, but with mysqldump and scp instead of FTP. The main difference is that SCP is secure and doesn't involve sending your passwords and your data over a network in plain text.

    It's just a two line bash script, with a few more lines to do rotating dated backups.
    is there any scripts out there u suggest? i dont know much when it comes to MySQL so all this is new to me

  6. #6
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No,

    1) Look at the manual for mysqldump, and write the command to dump a copy of your database as to a .sql text file

    2) Look at the manual for scp, and write the command to send this .sql text file to another server

    3) Create a text file with the first command on the first line, and the second command on the second line

    4) chmod +x this file to make it executable. Now you can run it at any time to make a backup and send it to your other server.

    You can also do it in reverse. Make the backup on the server, but have the other machine initiate the SCP connection to retrieve it -- pull instead of push.

    Here's a tutorial on using WinSCP to schedule the download of your backup files from your Windows PC:
    http://wiki.vpslink.com/Automate_Bac...al_with_WinSCP


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •