Skip to content
hertsch edited this page Sep 5, 2013 · 4 revisions

The .htaccess protected SyncData2 configuration file /syncdata/configuration/syncdata.json will be generated with default settings at the installation process.

You can fit the behaviour of SyncData2 to your needs, just edit the JSON file with any Editor (see sample of syncdata.json below).

The configuration file contains different sections:

  • CMS - settings of the parent Content Management System
  • email - this is general switch, if you don't want that SyncData2 is sending emails set "active":false, use this setting if a SyncData client is installed local and can not send emails
  • monolog - is the logger used by SyncData2. You find the .htaccess protected protocol in /syncdata/logfile/syncdata.log. If any error occurs, SyncData will also send an email (if enabled) to the specified address. "level":400 will send messages at any error, "level":100 will send you also debug information (many reports!)
  • general - general settings of SyncData2. The client_id is a unique identifier for each SyncData installation. Increase the memory_limit and/or execution_time if SyncData2 is running out of memory or execution time.
  • security - should be always active. The key protect SyncData2 from abuse, at the most commands you must also specify the key as parameter, i.e. http://domain.tld/syncdata/update?key=abc123de45

The keys below the sections backup and restore are identical:

  • settings - general settings, replace_table_prefix, add_if_not_exists and replace_cms_url should be normally always true
  • files- you can specify as many filenames you want, which must be always ignored. This setting hits each directory!
  • directories - you can specify top level directories which should be ignored and you can specify subdirectories (hits each directory).
  • tables - you can specify tables which must be always ignored. Important: specify the table names without the table prefix!

Sample syncdata.json:

{
  "CMS": {
    "CMS_SERVER_EMAIL": "[email protected]",
    "CMS_SERVER_NAME": "SyncData Server",
    "CMS_TYPE": "WebsiteBaker",
    "CMS_VERSION": "2.8.3",
    "CMS_MEDIA_DIRECTORY": "\/media",
    "CMS_PAGES_DIRECTORY": "\/pages",
    "CMS_URL": "http:\/\/yourdomain.tld",
    "CMS_PATH": "\/var\/www\/vhosts\/yourdomain.tld\/httpdocs",
    "INSTALLATION_NAME": ""
  },
  "email": {
    "active": true
  },
  "monolog": {
    "email": {
      "active": true,
      "level": 400,
      "to": "[email protected]",
      "subject": "SyncData Alert"
    }
  },
  "general": {
    "client_id": "ummspw5f7",
    "memory_limit": "512M",
    "max_execution_time": "300",
    "time_zone": "Europe\/Berlin"
  },
  "security": {
    "active": true,
    "key": "f8hQ2AKRF"
  },
  "backup": {
    "settings": {
      "replace_table_prefix": true,
      "add_if_not_exists": true,
      "replace_cms_url": true
    },
    "files": {
      "ignore": [
        ".buildpath",
        ".project",
        "desktop.ini"
      ]
    },
    "directories": {
      "ignore": {
        "directory": [
          "temp",
          "syncdata",
          "kit2",
          "nbproject"
        ],
        "subdirectory": [
          ".git"
        ]
      }
    },
    "tables": {
      "ignore": {
        "table": [
          
        ],
        "sub_prefix": [
          "kit2_",
          "syncdata_",
          "mod_kit_"
        ]
      }
    }
  },
  "restore": {
    "settings": {
      "replace_table_prefix": true,
      "replace_cms_url": true,
      "ignore_cms_config": true
    },
    "files": {
      "ignore": [
        ".buildpath",
        ".project",
        "desktop.ini"
      ]
    },
    "directories": {
      "ignore": {
        "directory": [
          "temp",
          "syncdata",
          "kit2",
          "nbproject"
        ],
        "subdirectory": [
          ".git"
        ]
      }
    },
    "tables": {
      "ignore": {
        "table": [
          
        ],
        "sub_prefix": [
          "kit2_",
          "syncdata_"
        ]
      }
    }
  }
}

Next step: INSTALLATION_NAME

Clone this wiki locally