Auto MySQL database backup

Page 1 of 2 12 LastLast
Results 1 to 25 of 43
  1. #1
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Auto MySQL database backup

    Hello guys,
    I want to release something that I just made.
    Haven't used much time on it but what it does is basiclly; Makes a .sql file of your database every (user defined) minutes, default is 360 minutes (6 hours).

    Its coded in PHP and is a console application so it works with Linux, Windows and Mac (all OS that supports PHP)

    If I get enough supporters I will make a version, that I will put more development time in. I was thinking about FTP upload support, multipile databases, Remote Sockets etc.

    F.A.Q
    Spoiler:

    What does this do?
    AutoBackup remotly downloads your MySQL database and stores it into a .sql file every (user defined) minutes.

    The application wont start?
    Make sure to have set the right php.exe (default is C:\xampp\php\php.exe)

    What OS's does this work on?
    Every OS that supports PHP.

    Is there a limit on how big my database can be?
    No, there is not a limit.

    Can you choose wich tables you would like to backup?
    No, you can choose what tables you would like to ignore (not include) in the backup.
    You can set it in AutoBackup.php variable $mysql_ignore. Seperate them by comma (,)
    Example: chatlogs,table1,table2 and so on.
    I recommed to just remove completely useless tables like chatlogs cus it takes a lot of space and is not really needed!

    How do i find my PHP folder?
    1. Create a page called phpinfo.php or test.php or whatever you want to call it
    2. Put this code in:
    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    3. Click Ctrl + F in your browser and search for Loaded Configuration File
    4. Copy that (Example: C:\xampp\php\php.ini)
    5. Replace php.ini with php.exp
    6. Thats your correct folder, open up AutoBackup.bat and replace the default with yours.



    Images:




    Download here


    Please rep++ and like!! :)
    Last edited by seanrom; 11-11-12 at 08:12 AM. Reason: Updated F.A.Q & Link


  2. #2
    Proficient Member PatrickDE93 is offline
    MemberRank
    Jun 2012 Join Date
    GermanyLocation
    172Posts

    Re: Auto MySQL database backup

    Great that is cool.
    Thank you Oleaa.

  3. #3
    G'nome sayin' Exonize is offline
    MemberRank
    May 2011 Join Date
    Czech RepublicLocation
    517Posts

    Re: Auto MySQL database backup

    Nice idea! can you choose wich tables you would like to backup?

  4. #4
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Exonize View Post
    Nice idea! can you choose wich tables you would like to backup?
    No, you can choose what tables you would like to ignore (not include) in the backup.
    You can set it in AutoBackup.php variable $mysql_ignore. Seperate them by comma (,)
    Example: chatlogs,table1,table2 and so on.
    I recommed to just remove completely useless tables like chatlogs cus it takes a lot of space and is not really needed!

    Updated F.A.Q

  5. #5
    Account Upgraded | Title Enabled! Raz0rDot is offline
    MemberRank
    Jun 2010 Join Date
    NorwayLocation
    489Posts

    Re: Auto MySQL database backup

    Seems awesome. Now I know what to use for my sites to back up the databases! Hoping you'll create an FTP version though, as it'd make my site backups alot easier.

    Great job mate! :D

  6. #6
    Account Upgraded | Title Enabled! sidney023 is offline
    MemberRank
    Feb 2012 Join Date
    NetherlandsLocation
    251Posts

    Re: Auto MySQL database backup

    When i open it it says: The system could not find the path specified, press any key to continue.
    When i press a key the progam closes. Help me plz!
    I use IIS7 with PHP version 5.4
    Ontopic: Really nice.
    Last edited by sidney023; 10-11-12 at 11:59 PM.

  7. #7
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts
    Quote Originally Posted by sidney023 View Post
    When i open it it says: The system could not find the path specified, press any key to continue.When i press a key the progam closes. Help me plz!I use IIS7 with PHP version 5.4Ontopic: Really nice.
    Read the FAQ

  8. #8
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by sidney023 View Post
    When i open it it says: The system could not find the path specified, press any key to continue.
    When i press a key the progam closes. Help me plz!
    I use IIS7 with PHP version 5.4
    Ontopic: Really nice.
    I reefer to the F.A.Q

    The application wont start?
    Make sure to have set the right php.exe (default is C:\xampp\php\php.exe)

    So whereever your php path is for IIS thats where your php.exe is located.
    I have no experience with IIS I only use Linux for web servers.

    So open AutoBackup.bat and replace C:\xampp\php\php.exe with where your php.exe is loacted!

    A small tutorial how to find your php directory.
    1. Create a page called phpinfo.php or test.php or whatever you want to call it
    2. Put this code in:
    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    3. Click Ctrl + F in your browser and search for Loaded Configuration File
    4. Copy that (Example: C:\xampp\php\php.ini)
    5. Replace php.ini with php.exe
    Thats it
    Last edited by seanrom; 11-11-12 at 12:12 AM. Reason: Added the tiny tutorial

  9. #9
    Developer Eronisch is offline
    MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    1,328Posts

    Re: Auto MySQL database backup

    Thanks, i was looking for this ;)

  10. #10
    Member Slynan is offline
    MemberRank
    Apr 2012 Join Date
    87Posts

    Re: Auto MySQL database backup

    It stops at the "items" table.

  11. #11
    Enthusiast JayNZ is offline
    MemberRank
    May 2011 Join Date
    New ZealandLocation
    34Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Slynan View Post
    It stops at the "items" table.
    Are you getting out of memory?

  12. #12
    Member Kiggo99 is offline
    MemberRank
    Jul 2011 Join Date
    69Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Slynan View Post
    It stops at the "items" table.
    Same here stopped at items table ;/

  13. #13
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    MemberRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    Re: Auto MySQL database backup

    If this relies on php then the script will time out on bigger databases.

    PHP: set_time_limit - Manual

  14. #14
    Enthusiast hedapepa is offline
    MemberRank
    Jan 2012 Join Date
    Barinitas, BariLocation
    47Posts

    Re: Auto MySQL database backup

    you could not make the climb database directly to a ftp server

    sorry my english i from venezuela

  15. #15
    Run, but I'll find you. Ddos Attack is offline
    MemberRank
    Jan 2011 Join Date
    AustraliaLocation
    908Posts

    Re: Auto MySQL database backup

    Awesome release! Thanks!

  16. #16
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: Auto MySQL database backup

    Cron job for CM$.

  17. #17
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Makarov View Post
    Cron job for CM$.
    That would make the load time to long when its acctuly going to backup, if your database is 200MB it will take ages to load up the website for that 1 poor user.

    Also I forgot the set_time_limit, Its updated now.
    Last edited by seanrom; 11-11-12 at 08:13 AM.

  18. #18
    No, Just no. Matthew is offline
    MemberRank
    Jul 2008 Join Date
    United KingdomLocation
    1,408Posts

    Re: Auto MySQL database backup

    There's already programs to do this. But using a terrible language like PHP to do anything large like this will never scale properly with huge databases. And if it does work with large databases, It's gonna be hella slow. Nice try, though.

  19. #19
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Matthew View Post
    There's already programs to do this. But using a terrible language like PHP to do anything large like this will never scale properly with huge databases. And if it does work with large databases, It's gonna be hella slow. Nice try, though.
    It works, its better than nothing, plus this is opensource so everyone can see that its has no exploits or some random shit that deletes your database.

    So if PHP is so terrible I would like to see you release something better and faster in another language.

  20. #20
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    Re: Auto MySQL database backup

    I have been searching for this for hours.

    You can't imagine my excitement and cheers when I saw you post this.

    Quote Originally Posted by Matthew View Post
    There's already programs to do this. But using a terrible language like PHP to do anything large like this will never scale properly with huge databases. And if it does work with large databases, It's gonna be hella slow. Nice try, though.
    Please release your method then, since you're so high and mighty this morning.


    jks Matthew is the only guy I like to hear criticism from.

  21. #21
    Member Armo is offline
    MemberRank
    Sep 2012 Join Date
    66Posts

    Re: Auto MySQL database backup

    Really nice, thanks.

  22. #22
    Ask me about Daoism FullmetalPride is offline
    MemberRank
    Nov 2010 Join Date
    2,172Posts

    Re: Auto MySQL database backup

    Fix.zip

    Fix for IIS users, who use a different path.

    NOTE: You MAY need to edit "AutoBackup.bat". Open it in Notepad, CTL+F, type "cd v5.3" and edit it to your correct PHP version. We use PHP V5.3, but if you're using 5.4, you'll need to change it to "cd v5.4".

  23. #23
    No, Just no. Matthew is offline
    MemberRank
    Jul 2008 Join Date
    United KingdomLocation
    1,408Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Oleaa View Post
    It works, its better than nothing, plus this is opensource so everyone can see that its has no exploits or some random shit that deletes your database.

    So if PHP is so terrible I would like to see you release something better and faster in another language.
    PHP: a fractal of bad design - fuzzy notepad

    ^ Why PHP is bad.

    As for releasing, why do I need too? Oracle them selves have released official tools to do this job on both Windows and *nix. I'm not bashing your work, I'm just saying put to practical use, this is a bad idea. It won't scale with large databases, PHP is slow and terrible. If you release your work, you might win over the 13 year olds who have no idea about programming and how things scale, that's fine. But there's going to be critics and skeptics. Me being one of them.

  24. #24
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Matthew View Post
    PHP: a fractal of bad design - fuzzy notepad

    ^ Why PHP is bad.

    As for releasing, why do I need too? Oracle them selves have released official tools to do this job on both Windows and *nix. I'm not bashing your work, I'm just saying put to practical use, this is a bad idea. It won't scale with large databases, PHP is slow and terrible.
    W/E

    I gotta agree that PHP dosent make sence sometimes, things that are not supose to work acctuly works.
    PHP works great for me and I hope it always will :)

  25. #25
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Auto MySQL database backup

    Quote Originally Posted by Matthew View Post
    PHP: a fractal of bad design - fuzzy notepad

    ^ Why PHP is bad.

    As for releasing, why do I need too? Oracle them selves have released official tools to do this job on both Windows and *nix. I'm not bashing your work, I'm just saying put to practical use, this is a bad idea. It won't scale with large databases, PHP is slow and terrible. If you release your work, you might win over the 13 year olds who have no idea about programming and how things scale, that's fine. But there's going to be critics and skeptics. Me being one of them.
    Well, that article has some points I agree with.
    However it's flexible and easy to understand and (in my opinion) a good way to introduce in other languages.

    But you have to understand that PHP is designed for "WEB DEVELOPMENT" and not to write programmes with it, like database backups or servers.


    And, take a look at this wiki page...
    HipHop for PHP - Wikipedia, the free encyclopedia ...



Page 1 of 2 12 LastLast

Advertisement