chef / chef_backup

A library to backup an Chef server
Other
7 stars 15 forks source link

Fix Backups #27

Closed bdwyertech closed 7 years ago

bdwyertech commented 7 years ago

The DataMap classes addconfig method was putting the config directory under a config key, rather than data_dir key which is referenced by the restore process.

https://github.com/chef/chef_backup/blob/master/lib/chef_backup/data_map.rb#L35

Attempt to address #26 and https://github.com/chef/chef-server/issues/1020

As you can see in the manifest below, the services have a data_dir defined, but configs does not.

{
  "strategy": "tar",
  "backup_time": "2016-12-08-06-34-27",
  "topology": "standalone",
  "ha": {
  },
  "services": {
    "rabbitmq": {
      "data_dir": "/var/opt/opscode/rabbitmq/db"
    },
    "opscode-solr4": {
      "data_dir": "/var/opt/opscode/opscode-solr4/data"
    },
    "redis_lb": {
      "data_dir": "/var/opt/opscode/redis_lb/data"
    },
    "postgresql": {
      "data_dir": "/var/opt/opscode/postgresql/9.2/data",
      "pg_dump_success": true,
      "username": "opscode-pgsql"
    },
    "bookshelf": {
      "data_dir": "/var/opt/opscode/bookshelf/data"
    },
    "upgrades": {
      "data_dir": "/var/opt/opscode/upgrades"
    }
  },
  "configs": {
    "opscode": {
      "config": "/etc/opscode"
    }
  },
  "versions": {
    "opscode": {
      "version": "12.11.0",
      "revision": "5c836a047ed5e5124b52bb946abc18c71c297024",
      "path": "/opt/opscode/version-manifest.json"
    }
  }
}
ryancragun commented 7 years ago

👍

markan commented 7 years ago

Looks good to me 👍