Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Other Taopix KB Articles

How can I backup my Taopix system?


Issue
It is important that you take regular (daily) backups of your Taopix MySQL database,
and all Taopix related folders. The following article will guide you through the steps
of how this should be done for your Control Centre and (if applicable) your Online
server.

Solution

Open MySQL Workbench and there will be a 'Local Instance MySQL'


connection listed in the top left hand corner. Click on this (you will be
prompted to enter your Root MySQL users password)

Select the Data Export menu from the left hand side, and then select your
'mediaalbum' (or possibly 'taopix') database.

Choose 'Export to Self-Contained File' in the Options section (and specify a


File Path value). Select the button with ... at the end of this field if you wish
to select a particular folder via Windows Explorer. You should also choose to
backup Stored Procedures, Functions and Create dump in a Single
Transaction by selecting the tickboxes below the File Path.

Page 1 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en
Other Taopix KB Articles

Automating Database Backup Using Task Scheduler

Click HERE to download an example batch file for your Taopix Control Centre
Database (that you can run via a Windows Scheduled Task) to automate
your daily MySQL backup process.

set filepath = "C:\MySQLBackups\Daily\"

cd C:\Program Files\MySQL\MySQL Server 5.5\bin\

mysqldump --user=root --password=<password>


--max_allowed_packet=1G --host=127.0.0.1 --port=3306 --default-character-
set=utf8 --routines --single-transaction <databasename> > %filepath
%"file.sql"

cd %filepath %

"C:\Program Files\7-Zip\7z.exe" a file.zip file.sql


rename file.zip "Taopix Control Centre Backup
%date:~-4,4%%date:~-7,2%%date:~0,2%.zip"
del file.sql

--------------------------------------------------

Page 2 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en
Other Taopix KB Articles
The script sets a path to save the backups to, it then backups up the database
including all stored procedures and triggers. It then zips the backup file (7-zip must
be installed on the machine for this to work), and then renames the zipped file with
a date and timestamp.

If you are backing up to a drive other than C: then you will need to enter a C:
command at the start of the script to change the drive so the mysqld command can
run, and then revert the drive back to the appropriate letter after the mysqls
command (i.e. the drive letter with a colon where you are writing the file.sql) so the
file.sql can be loacted by 7zip.

Click HERE to download an example batch file for your Taopix Online
Databases (that you can run via a Windows Scheduled Task) to automate
your daily MySQL backup process.

set filepath = "C:\MySQLBackups\Daily\"

cd C:\Program Files\MySQL\MySQL Server 5.5\bin\

mysqldump --user=root --password=<password>


--max_allowed_packet=1G --host=127.0.0.1 --port=3306 --default-character-
set=utf8 --routines --single-transaction --databases taopixonline
taopixonlineproducts taopixonlineprojects taopixonlineworking
taopixonlineassets > %filepath %"file.sql"

cd %filepath %

"C:\Program Files\7-Zip\7z.exe" a file.zip file.sql


rename file.zip "Taopix Online Backup
%date:~-4,4%%date:~-7,2%%date:~0,2%.zip"
del file.sql

--------------------------------------------

Please note: you will need to be logged into the Portal first to be able to
access these files

<password> will need replacing with your root database password

For the Control Centre database backup, <databasename> will need replacing with
either mediaalbum or taopix

Page 3 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en
Other Taopix KB Articles
set filepath at the start of the scripts will need updating to whereever you wish to
save backups to.

Please also check that your MySQL Server directory is at the path specified.

To create a task go to Administrator Tools --> Task Scheduler, right-click on


Task Scheduler Library and choose 'Create Task'.

Give the task a name (ie Taopix Daily BD Backup) and choose the Run
whether user is logged on or not option in Security Options section.

Page 4 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en
Other Taopix KB Articles

Go to 'Triggers' and select 'New' --> set it to recurr daily at an appropriate


time for you (most likely overnight).

Page 5 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en
Other Taopix KB Articles

Go to 'Actions' and select 'New' --> click Browse and go to the location
where you have saved your .bat file

Click OK twice and you will see the task added (you may be prompted to
enter your users password).

File System Backups

As well as the Control Centre database you must backup the following Taopix
Control Centre folders externally (not on the same machine). You could use Amazon
Page 6 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en
Other Taopix KB Articles
Glacier or backup to a Tape Drive if you have the server local.

Path Contents
..\TAOPIX\MediaAlbumServer\Public Auto Update Files and Customer Order Files
..\TAOPIX\MediaAlbumWeb\config Crucial Taopix Configuration Details
..\TAOPIX\MediaAlbumWeb\Branding Your unique Brand customisations
..\TAOPIX\MediaAlbumWeb\Customise Your Customisations and API Scripts
..\TAOPIX\MediaAlbumWeb\webroot\Branding Your unique Brand customisations
..\TAOPIX\MediaAlbumWeb\webroot\images Your custom image files
..\TAOPIX\MediaAlbumWeb\webroot\css Your custom css files
..\TAOPIX\MediaAlbumWeb\webroot\OrderData\Th Customer Order Thumbnails
umbnails

Online customers only:

As well as the Online databases you will want to consider backing up the following
folders externally (not on the same machine). You could use Amazon Glacier or
backup to a Tape Drive if you have the server local.

Path Contents
..\TAOPIX\taopixonline\Data Includes Order Thumbnail Data
..\TAOPIX\taopixonline\site\config Crucial Taopix Configuration Details
..\TAOPIX\taopixonline\site\Branding Your unique Brand customisations
..\TAOPIX\taopixonline\site\webroot\Branding Your unique Brand customisations
..\TAOPIX\taopixonline\site\webroot\images Your custom image files
..\TAOPIX\taopixonline\site\webroot\css Your custom css files

USERS OF 3RD PARTY BACKUP SOFTWARE:

Within your backup software you need to make sure that Backup Open Files is NOT
selected. Backups should also be performed without locks.

Do NOT use the Advance Open File option if available in your software.
Do NOT directly attempt to backup the MySQL folders and files.

Operating System Applies to:


Page 7 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en
Other Taopix KB Articles
Windows Servers 2008/2012

Taopix Version Applies to:


All Taopix Versions
Unique solution ID: #1079
Author: Taopix Support
Last update: 2015-02-18 16:28

Page 8 / 8
(c) 2015 Taopix KB <kb@taopix.com> | 22-09-2015 15:29
URL: http://kb.taopix.com/index.php?action=artikel&cat=6&id=80&artlang=en

Powered by TCPDF (www.tcpdf.org)

You might also like