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.
Nice idea! can you choose wich tables you would like to backup?
10-11-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by Exonize
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
10-11-12
Raz0rDot
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
10-11-12
sidney023
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.
11-11-12
Joopie
Quote:
Originally Posted by sidney023
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
11-11-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by sidney023
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
11-11-12
Eronisch
Re: Auto MySQL database backup
Thanks, i was looking for this ;)
11-11-12
Slynan
Re: Auto MySQL database backup
It stops at the "items" table.
11-11-12
JayNZ
Re: Auto MySQL database backup
Quote:
Originally Posted by Slynan
It stops at the "items" table.
Are you getting out of memory?
11-11-12
Kiggo99
Re: Auto MySQL database backup
Quote:
Originally Posted by Slynan
It stops at the "items" table.
Same here stopped at items table ;/
11-11-12
leenster
Re: Auto MySQL database backup
If this relies on php then the script will time out on bigger databases.
you could not make the climb database directly to a ftp server
sorry my english i from venezuela
11-11-12
Ddos Attack
Re: Auto MySQL database backup
Awesome release! Thanks!
11-11-12
Makarov
Re: Auto MySQL database backup
Cron job for CM$.
11-11-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by Makarov
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.
11-11-12
Matthew
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.
11-11-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by Matthew
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.
11-11-12
FullmetalPride
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
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.
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".
11-11-12
Matthew
Re: Auto MySQL database backup
Quote:
Originally Posted by Oleaa
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.
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.
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 :)
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.
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.
Thanks for the HipHop for PHP tool.
And yes im aware that PHP is mainly for web development, but PHP was the only language I could code it properly! Thats why I used PHP
11-11-12
Matthew
Re: Auto MySQL database backup
Quote:
Originally Posted by joopie
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.
Yes. But the issue is, is that it promotes bad programming practices from the beginning. As any real language wouldn't let you do half the stupid stuff PHP does let you do. And on the PHP manual its self it promotes bad programming in it's comments.
11-11-12
XenoGFX
Re: Auto MySQL database backup
Quote:
Originally Posted by Oleaa
Thanks for the HipHop for PHP tool.
And yes im aware that PHP is mainly for web development, but PHP was the only language I could code it properly! Thats why I used PHP
use a batch file :( i'm sad because people should know copying files would consume less i/o than creating text files with each subsequent insert statement.
12-11-12
Releastixx
Re: Auto MySQL database backup
Thanks i will use it for my hotel :D
12-11-12
Wilou
Re: Auto MySQL database backup
The link is dead can you reupload please - goob job it's very useful :) Sorry for my english i'm frensh
12-11-12
mohje
Re: Auto MySQL database backup
Nealty ! Top
12-11-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by mohje
Nealty ! Top
Should be up now, btw guys there is a like and rep button if you liked the release :)
02-12-12
Clawed
Re: Auto MySQL database backup
May i just point out that the download link is down.
02-12-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by Clawed
May i just point out that the download link is down.
The download link is working perfectly fine.
02-12-12
WJJ
Re: Auto MySQL database backup
Thanks for this Oleaa.
Too many users dont backup their databases and then cry when it goes wrong and they loose all their users. Theres no excuse now! lol.
Will
03-12-12
Jordan
Auto MySQL database backup
Use a crontab instead of keeping the process running your wasting cycles and memory :)
03-12-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by Jordan
Use a crontab instead of keeping the process running your wasting cycles and memory :)
Poor visitor that triggers the cron, its gonna take ages from them toload up:/ But I do get your point
03-12-12
Jordan
Auto MySQL database backup
Quote:
Originally Posted by Oleaa
Poor visitor that triggers the cron, its gonna take ages from them toload up:/ But I do get your point
Use a unix crontab not a PHP one.
08-12-12
r63
Re: Auto MySQL database backup
How can I make it work when the file path contains a space? :L
09-12-12
seanrom
Re: Auto MySQL database backup
Quote:
Originally Posted by r63
How can I make it work when the file path contains a space? :L
You should replace the space with underscore (_)
12-12-12
EvilCoder
Re: Auto MySQL database backup
Quote:
Originally Posted by Jordan
Use a unix crontab not a PHP one.
Nobody except for people knowing what they are doing is running their hotels on Linux. For example im running it on 3 servers. Kind of fun.... We all know that linux is way more stable, and your database is much safer on a linux machine... Well some of us do...
Nobody except for people knowing what they are doing is running their hotels on Linux. For example im running it on 3 servers. Kind of fun.... We all know that linux is way more stable, and your database is much safer on a linux machine... Well some of us do...