Skip to main content
Version: 4.1

Server

Scripts for managing the server.

Logrotate​

Reads configuration: logrotate_enable logrotate_size_limit logrotate_retention logrotate_keep_days and configures logrotate for caddy, hitechcloud, syslog.

hitechcloudcli server-logrotate

Migrate​

Moves every account (files, databases, mail, DNS, cron jobs) and the panel's settings from this server to a freshly installed one. Each account goes through the same transfer as user-transfer; one that fails does not stop the others, and the summary at the end names it and why. Run it again to retry: an account that moved is not moved twice. See Migrate server for what moves and what never does.

Usage:

hitechcloudcli server-migrate -h <DESTINATION_IP> --user root --password <DESTINATION_PASSWORD>

All available flags:

hitechcloudcli server-migrate -h <remote_host> -u <remote_user> [--password <password> | --password-stdin | --password-file <file>] [-p <ssh_port>] [--exclude-users] [--exclude-hitechcloud] [--exclude-logs] [--exclude-csf] [--exclude-postupdate] [--exclude-home] [--exclude-mail] [--exclude-bind] [--exclude-mysql] [--exclude-stack] [--exclude-contexts] [--force] [--background]
  • --exclude-users leaves the accounts out, --exclude-hitechcloud the panel's settings, --exclude-logs the logs, --exclude-csf the firewall rules and --exclude-postupdate /root/hitechcloud_run_after_update.
  • --exclude-home, --exclude-mail, --exclude-bind, --exclude-mysql, --exclude-stack and --exclude-contexts apply to the container stack only. From a server that runs its services on the host, an account's files, mail, zones and databases move with it.
  • --force migrates to a server that already has accounts of its own, or that lacks a PHP version or web server this server's sites use. Without it, the migration refuses before copying anything and says what to install, for example hitechcloudcli phpversions install 8.1.
  • --background runs the migration as a systemd unit and prints the unit's name and its log, under /var/log/hitechcloud/admin/migrations/.

It exits 0 when everything moved, and 1 when it refused or when any account or step did not complete.