A mapping file is a text file comprising several sections. Each section describes entities (business objects) that should be restored and defines mapping rules.
Sections names are enclosed in brackets. Items and options within each line are separated by white spaces or tabulation. All comments in file start with # symbol.
Mapping of IP addresses is specified in the [ipmap] section in the following format:
[ipmap]
10.58.97.31 -> 10.58.97.30
10.58.97.32 -> 10.58.97.35 exclusive
10.58.97.31 shared -> 10.58.97.36 exclusive
Specify the IP addresses that should be mapped (in the left part), place a hyphen and 'greater than' sign (->) and then specify existing IP addresses to map to (in the right part). 'Shared' and 'exclusive' attributes are optional.
Mapping of database servers is specified in the [db-servers] section in the following format:
[db-servers]
type:login:password@hostname:port -> type:login:password@hostname:port
Only MySQL and PostgreSQL databases are currently supported. You should specify database types as follows: mysql, postgresql. If you do not specify a database server in the right part after the -> symbols, the utility will consider that the database server should be mapped to itself. If the specified database server is missing, it will be created. If you wish to assign a database server as default for serving customers' databases, specify the ':default' argument to the right of the port number.
Example:
[db-servers]
mysql:admin:setup@10.58.97.31:8306:default
mysql:admin:setup@10.58.97.32:8306 -> mysql:admin:setup@10.58.97.31:8306
Mapping of client accounts is specified as follows: a separate section is created for each client account. To specify mapping preferences for a client account:
[client1]
[client1]
10.58.97.31
10.58.97.32->10.58.97.33
[client1]
10.1.36.100
10.1.36.101 ->10.1.36.200
domain_name1.com 10.1.36.100 -> 10.1.36.200
localhost:8306 -> 10.1.36.200:8306
domain_name2.com
In this case, the database server is specified in a short hostname:port format. You should be sure that the specified database server exists on your server, or is specified in the global [db-servers] section, in the left part of a mapping entry. Note that domain_name2.com from the above example will be restored and hosted on the first IP address found in this client's pool, for example, 10.1.36.100.