You are here

function _hosting_backup_path_requirements in Hosting 5

File

./hosting_help.inc, line 355
Hosting help subsystem

Code

function _hosting_backup_path_requirements() {
  $username = HOSTING_DEFAULT_SCRIPT_USER;
  $group = HOSTING_DEFAULT_WEB_GROUP;
  $backup_path = HOSTING_DEFAULT_BACKUP_PATH;
  $mkdir_cmd['@backup_path'] = $backup_path;
  $mkdir_cmd['@mkdir_cmd'] = <<<EOF
    mkdir {<span class="php-variable">$backup_path</span>}
    chown {<span class="php-variable">$username</span>}:{<span class="php-variable">$username</span>} {<span class="php-variable">$backup_path</span>}
    chmod 0700 {<span class="php-variable">$backup_path</span>}
EOF;
  $help['title'] = t('Write access to a directory to store backups');
  $help['summary'] = t('The drush user (<a href="http://drupal.org/project/drush">http://drupal.org/project/drush</a>) needs to be able to maintain the backups repository to ensure that your site is backed up successfully.
                        It is incredibly important that this path is not accessible via the web server, so that no undesirables can get their
                        hands on your database. The recommended path is directly above your platform path, but it can be anywhere.');
  $help['suggestion'] = t('Based on your server configuration we have determined that your path should be <code>@backup_path</code>', $mkdir_cmd);
  $help['configuration'] = t('Please enter the following commands : <pre>@mkdir_cmd</pre>', $mkdir_cmd);
  return $help;
}