Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Feb 2010
    Posts
    208
    Thanks
    15
    Thanked 2 Times in 2 Posts

    Arrow What PHP script could do that?

    Hi,

    I have mySQL database, and so much info in there

    I faced a problem when I tried to create PHP auto-saving script. Below is how it should work:

    1. Every week it runs itself automatically. (Also I could run it if impossible to do automatically)
    2. It would copy all my tables and rows into FORMAT which I could use to RESTORE my database if it will be damaged.
    3. All must work via PHP.
    4. The files (FORMATS) must be saved into my domain path (Like: www.hhh.com/secret/)
    5. The files (FORMATS) must be safe. Only I could access them.

    A lot of things I want, but if you help me - maybe you will help others who have considered this.

    Many thanks guys Good luck, and write your suggestions. Every suggestion is valuable.

  • #2
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,386
    Thanks
    8
    Thanked 1,077 Times in 1,068 Posts

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    545
    Thanks
    81
    Thanked 5 Times in 5 Posts
    If you have cpanel you can backup your mysql files using that.

    Also, you're specifying to backup your files on your own server. You don't really want to do that: if your server crashes you can't get to your backed up files.
    RalphF
    Business Text Messaging Services
    https://www.MobileTextingService.com

  • #4
    Regular Coder
    Join Date
    Feb 2010
    Posts
    208
    Thanks
    15
    Thanked 2 Times in 2 Posts
    I am using phpmyadmin... I know how to export info manually. The problem is HOW to do the PHP script, which would save exported files into directory...

    And all I will have to do is just to "trigger" PHP script once a week

  • #5
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,386
    Thanks
    8
    Thanked 1,077 Times in 1,068 Posts
    As rfresh mentioned ....
    Perhaps you can do the backup and automatically email you the file as an attachment.
    That way, you save it on your local PC in case the server crashes.

  • #6
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,530
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Do to it automatically, the only way I know of doing it (on an Apache server) is setting a cronjob.


  •  

    Posting Permissions

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