diff --git a/docs/configuration.md b/docs/configuration.md index 24e396eb2782fa916b7c02ad8a9a1b94830eaff2..cb9290fb8e01ef25d85409ab7114ee586d38f5a4 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -495,6 +495,12 @@ attribute. *master_election* attribute is also true, the backup job will only be run on the master host for the service. +`sharded`: When this attribute is true, the dataset is considered a +sharded (partitioned) dataset, so float will **not** automatically +attempt to restore it on new servers: the idea is that for sharded +datasets, the application layer is responsible for data management. +This attribute is false by default. + `owner`: For filesystem paths, the user that will own the files upon restore. diff --git a/roles/base/tasks/backup_dataset.yml b/roles/base/tasks/backup_dataset.yml index d5c64f553fbad78e9fcbc585e97fea4b88df3a62..24c3116807ff40ff4b0ac77130b8d549ab219be2 100644 --- a/roles/base/tasks/backup_dataset.yml +++ b/roles/base/tasks/backup_dataset.yml @@ -11,7 +11,7 @@ dataset_owner: "{{ item.1.get('owner', '') }}" dataset_path: "{{ item.1.get('path', '') }}" dataset_type: "{% if 'backup_command' in item.1 %}pipe{% else %}file{% endif %}" - dataset_should_backup: "{{ item.0.name in float_enabled_services and ((not item.1.get('on_master_only', False)) or (item.0.get('master_host') == inventory_hostname)) }}" + dataset_should_backup: "{{ (item.0.name in float_enabled_services) and (not item.1.get('sharded', False)) and ((not item.1.get('on_master_only', False)) or (item.0.get('master_host') == inventory_hostname)) }}" - name: Set up configuration for dataset {{ dataset.name }} (source) template: