473,839 Members | 1,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

database backup - how to?

How do I synchronize MySQL table data of my home PC with latest data
from a remote server ?

My home PC is on a very slow internet connection, so implementing
replication will cause long time read lock on remote server, which is
not desirable.

What are the tools for manual sync of tables ?

I'm running FreeBSD on my home PC.

Mike

Jul 23 '05 #1
12 2285
siliconmike wrote:
What are the tools for manual sync of tables ?


If the size of database is not too big:

Use mysqldump to create dump of the whole database. Use gzip or similar
tool to make it smaller for the transfering. On your computer, unzip it
and read it in using mysql-command line tool.

You can use mysqldump to get only given tables, in case you habe very
large static table and few small dynamic tables.
Jul 23 '05 #2


Aggro wrote:
siliconmike wrote:
What are the tools for manual sync of tables ?


If the size of database is not too big:

Use mysqldump to create dump of the whole database.


Oh O! The tables are Biiiiiiiiiiiiii iigggggggg!!

Jul 23 '05 #3
siliconmike wrote:
How do I synchronize MySQL table data of my home PC with latest data
from a remote server ?

My home PC is on a very slow internet connection, so implementing
replication will cause long time read lock on remote server, which is
not desirable.

What are the tools for manual sync of tables ?

I'm running FreeBSD on my home PC.

Mike


Mike,

If you can modify the programs on the server have them write the
SQL statements that insert or update your server database to a
flat file. Download the flat file and run it against your home
PC database.

As long as every SQL statement is terminated with a semi-colon
you can execute the contents of your flat file using:

mysql -u user_name database_name < flat_file_name

HTH

Jerry

Jul 23 '05 #4
<si*********@ya hoo.com> ecrivait/schrieb/wrote:
Use mysqldump to create dump of the whole database.


Oh O! The tables are Biiiiiiiiiiiiii iigggggggg!!


even if you compress them with bzip2/gzip? (generaly work
quite well on dumps).

Olivier

--
_______________ _______________ _______________ _______________ _____
Olivier M. - sp**********@83 04.ch - PGP: 0E84D2EA - Switzerland
Jul 23 '05 #5
Sounds good. But I would prefer another approach - putting a column
called NEEDS_BACK_UP in each remote table to keep track of whether a
record needs to be backed up.

In what you advise, probably a failed sql statement in a flat file
might leave the rest of the sql statements meaningless.

Although, my scheme I guess needs considerable change in my code.

Or there is another scheme - updated-timestamp in each remote table...

Mike

jerry gitomer wrote:
Mike,

If you can modify the programs on the server have them write the
SQL statements that insert or update your server database to a
flat file. Download the flat file and run it against your home
PC database.

As long as every SQL statement is terminated with a semi-colon
you can execute the contents of your flat file using:

mysql -u user_name database_name < flat_file_name

HTH

Jerry


Jul 23 '05 #6
Olivier M. wrote:
<si*********@ya hoo.com> ecrivait/schrieb/wrote:
Use mysqldump to create dump of the whole database.


Oh O! The tables are Biiiiiiiiiiiiii iigggggggg!!


even if you compress them with bzip2/gzip? (generaly work
quite well on dumps).


The site will initially have 2 GB tables, which will grow..

Jul 23 '05 #7
siliconmike wrote:
In what you advise, probably a failed sql statement in a flat file
might leave the rest of the sql statements meaningless.


No, if you use --force parameter (if I remember the syntax correctly),
which will force it continue after errors also.
Jul 23 '05 #8


Aggro wrote:
siliconmike wrote:
In what you advise, probably a failed sql statement in a flat file
might leave the rest of the sql statements meaningless.


No, if you use --force parameter (if I remember the syntax correctly),
which will force it continue after errors also.


What I mean is that there is no meaning to continue backup in case a
sql command fails. Because some of the future sql commands might be
depending on the result of the one that failed. The backup-data then
wouldn't be equivalent to the original one.

Jul 23 '05 #9
"" wrote:
How do I synchronize MySQL table data of my home PC with
latest data
from a remote server ?

My home PC is on a very slow internet connection, so
implementing
replication will cause long time read lock on remote server,
which is
not desirable.

What are the tools for manual sync of tables ?

I'm running FreeBSD on my home PC.

Mike


I have followed this thread...

but have a basic question..

Why do you want to ’synchronize’ db with your home pc? Since you
mention slow connection, you obvisouly only using your home pc for
back. Then there are no stringent requiremetns for synch’ing. All
you need is simple backups, which have been amply explained.

By the way, on a 2Gig DB, the best approach is mysqlhotcopy, if you
have root access. All the other approaches can be problematic:
mysqldump can fail on big db’s, and taring the files directly fails
too, since the files may be updating in middle of tar.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-databa...ict237213.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=824569
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
12148
by: Cristina | last post by:
Hallo i am a beginner into Oracle Technologies.I would like to make backup of my database,but i dont know how.Is there tools?Can i schedule the backup plan? thanks Cristina
2
4409
by: Rajesh Garg | last post by:
I will make it simpler to look... I have DB1 - as backup for day 1 LOg1 as backup of logs T1 T2 T3 T4 T5 ...some transaction on day 2 Now i backup again DB2 Log2
6
9621
by: Edwinah63 | last post by:
Hi Gurus, i am having problems with restoring a ms sql database. i have restored the database using veritas to a different location ('g:\datafiles') in no recover mode. when i view the database through the Enterprise Manager, it shows the database as silver icon (loading).
2
4330
by: trotter | last post by:
I want to know if there is a "best-practice" for setting up Database Maintenance Plans in SQL Server 7 or 2000. To be more specific, I want to know the order in which I complete the tasks. Do I complete optimization first, then integrity checks, then translog backup, then full backup??? OR is there a better order which should be used? Should I ALWAYS backup the transaction Log before I complete a full database backup, and if so, why?? ...
2
2114
by: Matt | last post by:
I run SQL Server 2000 and use thier database maintenance plans to backup my databases. My questions is what happens if a change is being made to a database table while a backup is running? Should I be locking the databases before the backup begins? Scenario: 1) Database Plan begins backup at 7:00 PM. 2) At 7:01 PM a web user updates their password while the backup is taking place.
5
14722
by: Hassan Naqvi | last post by:
Hi, Basically, I am Java developer. In past I have played with Oracle using Java (JDBC). But this is the time to play with IBM DB2 using Java (JDBC). So kindly help this DB2 newbie. I have a file of 32 MB, named as "fdbk5.0". This is actually a database created in DB2 and containing records. I am interested in viewing the *structure of this database, i.e. table names, column names and finally all the records. How I can do this? Which...
5
3245
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup purposes). Now, the drive is defective and can't read the tapes anymore. Server is AIX 4.3.2 and database is IBM DB2 Server (DB2 for AIX Version 2.1.2)
5
34056
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. My company has two identical web sites. One copy is for our customer, and one copy is for us to test our code changes on. We developed a hard to isolate bug in the copy of the web stie for our
3
23006
by: Bill E. | last post by:
I'm trying to restore a database backed up a production machine onto my development machine. I don't want to restore the transaction logs (there are two) because they are far too large and are unnecessary for what I'm doing. I would be happy to simply create one new log in my development environment. Therefore, I backed up the database using the No_Log option as in backup database CPTS to disk = 'd:\backups\cpts_backup_billeh.bak'...
5
3494
by: Roger | last post by:
backup log testdb with truncate_only DBCC SHRINKFILE (testdb_log, 100) WITH NO_INFOMSGS backup database testdb to disk = '\\DC01\Backups\DB01\testdb.bak' with init and does the shrinkfile command reduce the size of the ldf ?
0
9698
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10914
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10656
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7834
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5684
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.