database export

Joe W. Byers ecjbosu at aol.com
Wed Feb 10 11:38:11 UTC 2016


On 02/10/2016 01:04 AM, Andy Chung wrote:
> Hi there,
>
> I have exported my kmymoney to mariadb.
> going fwd I would like to use db as periodic bkup.
> in my next export should I
> (a) export to same db name?  would it overwrite and not causing any 
> duplicate entries, or
> (b) export to another db e.g. kmymoney_yyyymmdd?
>
> Happy Chinese New Year.

Hello,

I have this  on a linux machine using a monthly cron, You could do 
something similar on windows in a batch file with the system schedular.

DATE=`date +%Y%m%d`
# Our Base backup directory
BASEBACKUP="/DBtemp"
FinalDest="/media/usbdisk"
#"/mnt/usb-drive"
HOST="localhost"

     mysqldump -h$HOST --user=user -ppassword --opt kmymoney | bzip2 -c 
 > $FinalDest/kmymoney-$DATE.sql.bz2

I am using a mariaDB as well.   This does a test dump with create 
statements that is zipped.  if needed it can be executed from the 
command line.  I had a system crash several years ago and this saved my 
behind.



-- 
*Joe W. Byers*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20160210/fcf4ee9c/attachment.html>


More information about the KMyMoney mailing list