Incremental SQL Backups?

Status
Not open for further replies.

legend

New Member
Messages
19
Reaction score
0
Points
0
Is it possible to backup only the changes and not the entire database everytime?
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
No - although I think this would be a handy feature. The trouble with incrememntal backups is that you only need a previous one to be broken to lose some data.
 

legend

New Member
Messages
19
Reaction score
0
Points
0
Oh... In that case, is there a proper way to backup my data just to ensure that everything is ok? Maybe mirror my sQL database? Is that possible?
Edit:
Ok.. I'll be a little clear. Can I do something such that the SQL database on one server gets updated everytime some change takes place in the other SQL server or maybe update itself once a week or something. And then when it fails to connect to the remote SQL, it should be able to use its own SQL. Is this possible?
 
Last edited:

Tyrael

New Member
Messages
71
Reaction score
0
Points
0
You can build a master-slave replacation system with mysql, but I think you can't do this with x10.
Or you can use 2 database connection on your other site:
first step: add your another host's ip address at the cpanel to your remote mysql list
second: in your script you use 2 database connection, 1 for localhost, and 1 for the other db, and you have your run every query on both of the connections.
This way you can commit all of the changes on both of the machines.

Why have you need this feature?

Tyrael
 

legend

New Member
Messages
19
Reaction score
0
Points
0
Well, the reason why I would need this is maybe when the host is down... Ofcourse, its not for x10hosting, but I have another host on which a script is running and I would not want that to be down even when my other host is down.

Your method works just perfectly but the problem would be what if the script was not written by me? I mean, if there are 100's of SQL Inserts and Updates, then I'll have to replicate all the statements everywhere isn't it?
 

Tyrael

New Member
Messages
71
Reaction score
0
Points
0
Well, the reason why I would need this is maybe when the host is down... Ofcourse, its not for x10hosting, but I have another host on which a script is running and I would not want that to be down even when my other host is down.

Your method works just perfectly but the problem would be what if the script was not written by me? I mean, if there are 100's of SQL Inserts and Updates, then I'll have to replicate all the statements everywhere isn't it?

If it's not something crazy ****, then the author used some object or function library for the sql querys.
Then you dont have to duplicate all of the function calls, simply just edit this class/function then adding your snippet, wich connects to your x10 db and executes the query parameter.

Tyrael
 

legend

New Member
Messages
19
Reaction score
0
Points
0
Lol... You're right but then its not practical to edit all that. I mean, I use tonnes of other scripts that werer programmed for the original script. Even if the original author did something like that, I wouldn't expect the whole thing to run flawlessly.

Ok, I have another idea, when I click on a Full Backup, it creates a complete backup of the site. But is there any way I could actually ask it to just create a sql backup so that I can download that alone instead of the whole site everytime?
 

Tyrael

New Member
Messages
71
Reaction score
0
Points
0
Lol... You're right but then its not practical to edit all that. I mean, I use tonnes of other scripts that werer programmed for the original script. Even if the original author did something like that, I wouldn't expect the whole thing to run flawlessly.

Ok, I have another idea, when I click on a Full Backup, it creates a complete backup of the site. But is there any way I could actually ask it to just create a sql backup so that I can download that alone instead of the whole site everytime?

with phpmyadmin, you can do db backup.
select the db what you want backup, push the export button, select the tables you want to save, select REPLACE for the Export type, give a name for the file, select some compression method (or not), then save the file.
and on your another host: select the db, click on the import, browse the file, then submit.

Tyrael
 

legend

New Member
Messages
19
Reaction score
0
Points
0
Oops... I'm sorry I should've been more clear. I want to create a backup of the sql on the server itself so that I can just transload the file onto my other host.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
205
Points
63
I'm sure there is a PHP script that could do this for you. I'd check out google as I don't know any off the top of my head.

-Corey
 
Status
Not open for further replies.
Top