DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

DB Sync

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2005-06-15T14:42:10
Author:Jean-David Gadina
Email:macmade@gadlab.net
Info 3:
Info 4:

DB Sync

Extension Key: dbsync

Copyright 2000-2002, Jean-David Gadina, <macmade@gadlab.net>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

DB Sync 1

Introduction 1

What does it do? 1

Users manual 2

Installation 2

Synchronizing tables 2

Synchronizing databases 4

Known problems 5

To-Do list 5

Changelog 5

Introduction

What does it do?

This extension allows you to synchronize your Typo3 database with an external Typo3 database. It also allows you to synchronize two different table inside the same database.

IMPORTANT NOTE: Be sure to have backup of your database data before using this extension. Although it should work without any problem, it has not been tested a lot in a production environment! This extension is distributed in the hope that it will be useful, but without any warranty!

Users manual

Installation

The installation of this extension is very simple. Just connect to the Typo3 Extension Repository and download «DB Sync» (dbsync), located in the backend module section. Note that you will also need to download the «Developer API» extension (api_macmade), as it will be needed by the module.

Once the extension is installed, you'll notice a new element in the left menu, under the tool section.

img-1

Synchronizing tables

The first function of the backend module allows you to synchronize two different tables inside the same database. This can be useful in a lot of contexts, like switching from an extension to an other without loosing existing content. In the examples below, we will be synchronizing the backend users with the frontend users.

The first thing to do is to select the tables to use. You first have to select a source table (on the left). This is the table where the records are coming from. Then, just select a destination table (on the right). This is were the records from the other table will go.

img-2

Then, you need to map the fields of those two tables. The program will try to create the mapping for you, by checking the names of the fields, but you can also map the tables by hand, with the help of the selector boxes. On the right column, you'll see all the available fields of the destination table. You can then map each field with one from the source table.

img-3

Once you're done with the mapping, you can choose between some options, which will affect the way the records are imported in the destination table.

First, you can choose either to add the source records to the destination table, or to empty the destination table before the importation. With the first method, the existing records on the destination table will be preserved.

You also have to choose a destination page for the imported records, with the help of the selector box representing the site tree.

You can then choose to import only some records. If you don't select specific records in the select box, then the whole table will be imported. By default, the records marked as deleted in the database won't be imported, but you can always choose this with the checkbox just below.

img-4

Synchronizing databases

The second function of the module allows you to synchronize two different databases. This can be very helpful if you have, for instance, a production (public) website and a development website. You can do everything on the development website, so you don't risk to take the production site down, and then you just need to sync the two databases to publish your changes on the public site.

The first step is to connect to a database server, by providing a username, password, and host.

img-5

Once you're connected to the external database server, you'll see a list of the databases the user has access to. Just select one in order to synchronize.

img-6

You'll then see all the tables which are present on both databases. You can choose either to add the records from the external tables to the local tables, or the erase the local tables before importing the external records. With this last setting, you'll get an exact copy of the external database.

Be careful when you sync databases, and backup your data before proceeding.

img-7

Known problems

None at the time. Just contact me if you find some.

To-Do list

Please contact me if you have any suggestion about this extension.

Changelog

((generated))

0.1.0: 1 st public release

img-8 DB Sync - 5