Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2008
    Posts
    15
    Plugin Contributions
    0

    Default Automated Nightly DB Backup Script?

    I'm using the database backup plugin from within the Admin screens to manually create database backups before/after modifications.

    But I'd like to set up a cron job that I can run each night that:
    1. puts my store into maintenance mode
    2. does a full database dump to the local file system (I use rsync to copy the daily diffs to a remote server)
    3. puts my store back into production

    I figured this must be a common need but after searching the forums I didn't find anything. I was hoping someone could share their solution?

    Best Regards,
    Steve

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Automated Nightly DB Backup Script?

    I can email you one that does all but not the maint mode that you can cron

    email m via my sig
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: Automated Nightly DB Backup Script?

    Thanks a lot kobra.

    It took me a while to find it but there is also this script which emails the compressed backup to the specified email address:
    http://www.zen-cart.com/forum/showthread.php?t=60074

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Automated Nightly DB Backup Script?

    The one I sent you also does this:

    Find this in the file and change to your email address

    Code:
    # Email Address to send mail to? ([email protected])
    MAILADDR="[email protected]"
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Automated Nightly DB Backup Script?

    Quote Originally Posted by kobra View Post
    I can email you one that does all but not the maint mode that you can cron
    Perhaps posting it publicly may allow others to benefit from it as well.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Automated Nightly DB Backup Script?

    DrByte,

    Check your mail
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. Automated Database / MySQL Backup
    By kwright in forum General Questions
    Replies: 7
    Last Post: 14 Jul 2009, 09:27 PM
  2. Automated database backup
    By mooneyn in forum General Questions
    Replies: 4
    Last Post: 19 Oct 2008, 07:39 AM
  3. Automated Backup via CRON ??
    By Netsmurf in forum General Questions
    Replies: 4
    Last Post: 14 May 2007, 06:05 PM

Posting Permissions

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