Move/sync log between machines

2 posts / 0 new
Last post
M0TRN
Move/sync log between machines

Hi,
I am using CQRLog on my main shack computer but also on two laptops that I travel with. On my main PC I have my home log (M0TRN) and on the laptop I have logs for the various calls I use when travelling (e.g. M0TRN/P, OV5T, W7/OV5T etc.)
I want to copy all the logs from the laptop to my main PC when I am at home, both to upload to LoTW (I don't have the LoTW software and certificates on my laptop) and to be able to do look up in the other logs.
I understand that the data is stored in a MySQL database, but I can't figure out an easy and simple way to copy the logs from the laptop to the PC. Ideally I want to do this with a script that I can just run when I return home (or when I have a VPN connection), and I don't like exporting to ADIF and re-importing because I want to preserve all fields as they are in my master log.
Can anyone recommend a way to accomplish what I want?
73 and HNY 2013,
Thomas M0TRN

k5tri
[quote=M0TRN]

[quote=M0TRN]

I want to copy all the logs from the laptop to my main PC when I am at home, both to upload to LoTW (I don't have the LoTW software and certificates on my laptop) and to be able to do look up in the other logs.

 

[/quote]

You can take a look at mysqldump and do it that way. mysqldump allows you to dump a database into a file which would contain all the DML and DDL and then import it into your main database.

Here's more info on mysqldump: http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

Example for dumping from laptop:

mysqldump --user=<username> --password=<password> --host=<server 1 hostname> --port=<port>  <database name> > dump.sql

And into your main database:

mysql --user=<username> --password=<password> --host=<server 2 hostname> --port=<port> <database name> < dump.sql

You can exclude tables as the one you really care about is cqrlog_main. Other options would be
to simply do a select based on the date forward and write that into a file and then import again
into your main database as the dump method might leave you with dupes unless you purge the database
on the laptop after each import.

73 Mike K5TRI