Parametrized configuration file to create automatic backup task refs #5608

This commit is contained in:
Luca Frosini 2016-11-02 12:54:24 +01:00
parent 0e9b8dfea9
commit 8ac2ef8511
3 changed files with 23 additions and 14 deletions

View File

@ -18,6 +18,7 @@ orientdb_configuration_files:
- orientdb-server-config.xml
- default-distributed-db-config.json
- hazelcast.xml
- automatic-backup.json
orientdb_letsencrypt_ssl_enabled: False
@ -51,3 +52,15 @@ orientbd_hazelcast_encryption: False
orientdb_hazelcast_multicast_enabled: True
orientdb_hazelcast_multicast_group: 235.1.1.1
orientdb_hazelcast_multicast_port: 2434
# For Reference see http://orientdb.com/docs/2.2/Automatic-Backup.html
orientdb_automatic_backup: True
orientdb_automatic_backup_mode: 'EXPORT'
orientdb_automatic_backup_export_options: ''
orientdb_automatic_backup_delay: 24h
orientdb_automatic_backup_first_time: '23:00:00'
orientdb_automatic_backup_directory: '{{ orientdb_home_prefix }}/{{ orientdb_user }}/b'
orientdb_automatic_backup_target_file_name: '${DBNAME}-${DATE:yyyyMMddHHmmss}.zip'
orientdb_automatic_backup_compression_level: 9
orientdb_automatic_backup_buffer_size: 1048576

View File

@ -1,11 +1,11 @@
{
"enabled": true,
"mode": "EXPORT",
"exportOptions": "",
"delay": "24h",
"firstTime": "23:00:00",
"targetDirectory": "backup",
"targetFileName": "${DBNAME}-${DATE:yyyyMMddHHmmss}.zip",
"compressionLevel": 9,
"bufferSize": 1048576
"enabled": {{ orientdb_automatic_backup | ternary('true','false') }},
"mode": "{{ orientdb_automatic_backup_mode }}",
"exportOptions": "{{ orientdb_automatic_backup_export_options }}",
"delay": "{{ orientdb_automatic_backup_delay }}",
"firstTime": "{{ orientdb_automatic_backup_first_time }}",
"targetDirectory": "{{ orientdb_automatic_backup_directory }}",
"targetFileName": "{{ orientdb_automatic_backup_target_file_name }}",
"compressionLevel": {{orientdb_automatic_backup_compression_level }},
"bufferSize": {{ orientdb_automatic_backup_buffer_size }}
}

View File

@ -9,11 +9,7 @@
</handler>
<handler class="com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin">
<parameters>
{% if orientdb_distributed %}
<parameter value="true" name="enabled"/>
{% else %}
<parameter value="false" name="enabled"/>
{% endif %}
<parameter value="{{ orientdb_distributed | ternary('true','false') }}" name="enabled"/>
<parameter value="nodeName" name="{{ ansible_fqdn }}"/>
<parameter value="${ORIENTDB_HOME}/config/default-distributed-db-config.json" name="configuration.db.default"/>
<parameter value="${ORIENTDB_HOME}/config/hazelcast.xml" name="configuration.hazelcast"/>