Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    Getting StartedAdministrator documentationFunctional characteristics
      Technology descriptionarrow
    • Architecture OverviewComponent Description
        Deployment schemesarrow
      • Basic schemeFail-safe schemeTypical Placement in Infrastructure
    System requirements
      Admin Panelarrow
      • Account areaarrow
        • Accountsarrow
        • Account UsersAccount Virtual SendersAccount Database Indexes
        TariffsExternal data configurationLDAPTasksSchedule JobsGlobal Stop ListsWebversion Store Policies
        Settingsarrow
      • Databases
          Accessarrow
        • AdminsAPI tokens
        Notifiers
          MTAarrow
        • Default rulesRetry rulesLock rulesBounce patternsStrategiesKeysISPsPools
      Nodes
        Sendersarrow
      • EmailSMSEvent generatorIntegration with SendsayENS: настройка сендера
        Reportsarrow
      • Audit JournalData Usage
        Toolsarrow
      • ARF decoderURL decoderSMID decoderLicense
      Platform installationarrow
    • Automatic installationManual installationRunning the platform in a Docker container
      Platform configurationarrow
    • Configuration fileDomain settingsLDAP access configurationSending Email via SMTP relayPixel and push domain configurationCluster and Replication SetupSystem notifications configurationProcesses UNIX sockets configurationHTTPS ConfigurationMigrating from MongoDB Community Edition to Percona Server for MongoDBAdding sender IP addressesDeduplication request settingsPostgreSQL database for account dataProxy server settingsKeycloak Integration with AltcraftGetting HTTP service statusesConfiguration MongoDB logs rotation
        Configuration of system constants and directoriesarrow
      • Filtering bot actionsDirectory of gender markers
      Platform maintenancearrow
    • Personnel requirementsPlatform maintenance processesPlatform updatingPlatform service monitoringBackup and recoveryTransferring the platform to a new serverCreating, deleting, and populating tables for statistics in ClickHouseUsage of the aktool utilityUsers and directories engaged by the platform
      Custom channels guidearrow
    • OverviewCreating and configuring a channelEntity field configurationTemplate languageEntities
        Pipesarrow
      • Pipe: Basic ConceptsResultErrorsLogPackUnpackHTTP RequestStore SetStore GetSelectorSQLEventerScheduler
        Pipelinesarrow
      • Pipeline: Basic ConceptsMessageScheduleListenerModerateStop
      Extraarrow
    • System page customizationSend Message IDИнструкция по миграции истории в ClickHouseInstructions for migrating history to ClickHouseUtility for importing push subscriptions to Firebase projectUtility for importing push subscriptions to Firebase project
    Processing HTTP/HTTPS traffic
      Administrator APIarrow
      • Accounts admin apiarrow
        • Restricted accessarrow
        • Account Activation and DeactivationAccount Freeze and Unfreeze
        Get accounts listAdd a new accountDelete the account
        Account usersarrow
      • Update an Existing AccountAdd a new accountDelete a userGet a list of usersSending a Welcome Email
        Nodesarrow
      • Synchronize node MTA configurationGet nodes listGet node MTA statusActivate node MTADeactivate node MTA
        Senders admin apiarrow
      • Create or update AKMTA senderGet AKMTA sender informationAssign account to senderGet senders listDelete senderRestore sender
          Sender queuearrow
        • Get sender queue informationHold sender queueRelease sender queueClear sender queue
        Virtual sendersarrow
      • Get virtual senders listGet virtual sender informationCreate virtual senderUpdate virtual senderClone virtual senderDelete virtual sender
    Documentation Archive
  • Platform maintenance
  • Transferring the platform to a new server

Transferring the platform to a new server

Step 1. Install the necessary components for the platform to work on the new server in accordance with the instructions: Manual installation

Step 2. Switch RabbitMQ by correcting the connection string in main.json to the new host.

Step 3. Make a backup according to the instructions:

For a full backup, the following data is required:

  • AKD control module;
  • MongoDB databases (account and control can be separated or combined into one database);
  • бSSDB databases (actions, hardbounces, nofitications and stats).
note

All of the backup methods create an archive in a user's current directory. Before executing the command, you must make sure that there is enough free space in the current directory to save the archive.

Control module​

Backup​​

The recommended way to create a backup is to place the directory with the control module in an archive, excluding logs, sockets and PID files:

tar -czvf akd-backup.tar.gz /opt/akd --exclude=*.log --exclude=*.sock --exclude=*.pid

Recovery​

Unpack the archive and move its contents:

tar -xzvf akd-backup.tar.gz
mkdir -p /opt/akd
cp -R akd/* /opt/akd/
note

To restore the control module from a backup copy on a new server, you must first configure the environment necessary for the module to operate (see the page [Preparation, database configuration, launching the platform])(/admin-guide/platform-installation/9406483).

MongoDB​

All backup methods are described in more detail in the official documentation::

https://docs.mongodb.com/manual/core/backups

tip

We recommend backing up using snapshots ([Back Up and Restore with Filesystem Snapshots]) (https://docs.mongodb.com/manual/tutorial/backup-with-filesystem-snapshots/#back-up-and-restore-with-filesystem-snapshots). МThe method using snapshots allows you to save a lot of time when restoring large collections with a large number of indexes.

Backup​​

For small instances, you can use the utilitymongodump https://docs.mongodb.com/database-tools/mongodump:

mongodump --host 127.0.0.1 --port 27017 --gzip --archive=mongodb-backup.tar.gz

Recovery​

Restore a backup using the utility mongorestore (https://docs.mongodb.com/database-tools/mongorestore):

mongorestore --host 127.0.0.1 --port 27017 --gzip --archive=mongodb-backup.tar.gz

ClickHouse​

Backup methods are described in the official documentation:

https://clickhouse.com/docs/ru/operations/backup/

Using the utility as an example clickhouse-backup​

Minimum configuration file

clickhouse:
username: default
password: "abcdefghijklmnopqrstuvwxyzABCDEF"
host: localhost
port: 9000
data_path: "/var/lib/clickhouse"
general:
remote_storage: none
backups_to_keep_local: 7
backups_to_keep_remote: 31

Backup​

clickhouse-backup create $BACKUP_NAME >> /var/log/clickhouse-backup.log

Recovery​

clickhouse-backup restore $BACKUP_NAME >> /var/log/clickhouse-restore.log

SSDB​

All backup methods are described in more detail in the official documentation:

https://ideawu.github.io/ssdb-docs/backup.html

tip

We recommend backing up using snapshots and then moving all data from the snapshot to an archive. Importing and exporting keys in large SSDB databases can take up to several days.

Backup​

For small instances you can use utility ssdb-dump (см. https://ideawu.github.io/ssdb-docs/backup.html):

/usr/local/ssdb/tools/ssdb-dump -h 127.0.0.1 -p 4420 -a abcdefghijklmnopqrstuvwxyzABCDEF ./ssdb-hardbounces-dump
/usr/local/ssdb/tools/ssdb-dump -h 127.0.0.1 -p 4430 -a abcdefghijklmnopqrstuvwxyzABCDEF ./ssdb-notifications-dump

Recovery​

Clear data from previous instances and move backup contents:

rm -rf /var/lib/ssdb/hardbounces
mv ssdb-hardbounces-dump /var/lib/ssdb/hardbounces

rm -rf /var/lib/ssdb/notifications
mv ssdb-notifications-dump /var/lib/ssdb/notifications

Step 4. Check that the platform is working correctly.

  • Check that processes are running:
AK:api
AK:proctask
AK:procrpc
AK:procactions
AK:procresume
AK:procsenderev
AK:procsmsev
AK:proctrigger
AK:procworkflow
AK:prochook
AK:procnotify
AK:procpixel
AK:procwebver
AK:proctrkweb
AK:procpush
AK:procpiper
AK:stataggregator
AK:tariffcontroller
AK:webcontrol
AK:procleadsaver
AK:procevent
AK:proceventgen
AK:procintegras
AK:procplmt
AK:trkaction
AK:trkimage
AK:trkread
AK:trksms
AK:trkwebctrl
AK:trkpush
AK:cookie_saver
AK:trkcustom
AK:trklisten
AK:procsmslisten
AK:trk_amazon_sns
AK:health
AK:webadmin
  • Check the logs of these processes for errors:
note

Default path: /opt/akd/logs

Step 5. Start tracking on the new host manually:

/opt/akd/ak/bin/proctrkweb --config /opt/akd/config/main.json
/opt/akd/ak/bin/trkaction --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trkimage --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trkread --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trksms --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trkwebctrl --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trkpush --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trkcustom --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trklisten --rpcAddrs <old_host_ip>:8972
/opt/akd/ak/bin/trk_amazon_sns --rpcAddrs <old_host_ip>:8972

Step 6. Stop the platform on the current host:

/opt/akd/akd stop

Step 7. Launch the platform on the new host.

note

restart used to ensure that tracking switches to the current host.

/opt/akd/akd restart
Last updated on Jul 13, 2022
Previous
Backup and recovery
Next
Creating, deleting, and populating tables for statistics in ClickHouse
  • Control module
    • Backup​
    • Recovery
  • MongoDB
    • Backup​
    • Recovery
  • ClickHouse
    • Using the utility as an example clickhouse-backup
    • Backup
    • Recovery
  • SSDB
    • Backup
    • Recovery
© 2015 - 2026 Altcraft, LLC. All rights reserved.