Home Tool Ottomatik – Convenient automatic backup for MySQL and files on the server

Ottomatik – Convenient automatic backup for MySQL and files on the server

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

While all Web Hosting services at AZDIGI come with built-in daily automatic data backup support to ensure data preservation, customers using advanced services such as Virtual Private Servers (VPS) or Dedicated Servers will need to set up backups on their servers themselves.

In this article, AZDIGI will introduce you to a tool that supports automatic data backup and stores it on Google Drive, Dropbox, Amazon S3 quickly and efficiently, and that tool is Ottomatik. The special feature of this service is the ability to schedule backups every minute, every 5 minutes, every hour, every day, every week, and every month.

Introducing Ottomatik

Ottomatik is a Backup-as-a-Service (BaaS) type of service, which means you will need to install their agent on your servers and manage the backed-up data from their admin panel. Ottomatik is a paid service, but there is still a free option available that is suitable for users with only a single server.

Ottomatik Pricing Table

So with the free usage, you can create a backup job with a maximum backup frequency of once a day, and still have support for sending backup data to your storage accounts like Google Drive, Amazon S3,…

However, for more critical websites and servers, you might consider using the Professional package, which allows for more backup jobs and a maximum backup frequency of every 5 minutes, ensuring real-time data backup.

Setting up and using Ottomatik

In this article, we will guide you through installing Ottomatik on a Linux-based server. Ottomatik only supports Linux-based operating systems, including Amazon Linux, CentOS, Debian, Fedora, Linux Mint, Oracle Linux, Red Hat, Red Hat Enterprise, Scientific Linux, and Ubuntu.

To start with Ottomatik, you can sign up for an account at https://app.ottomatik.io/signup and use the premium features for free during the first 14 days without needing to add payment information to your account.

After completing your account setup, navigate to the “Server” section and click the “Add Server” button to specify the server you want to back up.

screenshot 2023 11 06 20.45.57@2x

Next, give a name to this server for easy identification and click “Add New Server.”

screenshot 2023 11 06 20.47.28@2x

In the final step, they will provide a short script for agent installation, and you just need to copy it to your server and run it. Note: if your server has firewall software like CSF or firewalld installed, go here to get Ottomatik’s IP list and add it to the whitelist.

To ensure a successful installation, your server must have the /root/.ssh/authorized_keys file in place. So, create this file in case you are not using SSH Key for SSH access.

screenshot 2023 11 06 20.48.43@2x

During the installation, it will ask if you want to enable real-time MySQL data backup, you can choose by typing yes or no However, please note that enabling this feature might impact performance on servers with limited CPU resources. Therefore, you should choose no if you don’t want to enable this feature.

screenshot 2023 11 06 21.12.28@2x

The next step is to ask you if you want to create a separate MySQL account for the backup task. Here, you should select yes and enter the username and password to create an account. It’s important to avoid using root MySQL account or the MySQL account of your website for running backups.

screenshot 2023 11 06 21.15.08@2x

Keep the other information as it is and press Enter to proceed.

Once the installation is complete, Ottomatik will provide you with a set of commands to create a user database and grant permissions. You can copy these commands and access the MySQL management command line using the “mysql” command, then paste them.

Now, go back to Ottomatik’s website, and you’ll see a “Success” notification, indicating that the server has been successfully added.

screenshot 2023 11 06 21.15.56@2x

With this, the installation of the Ottomatik agent on your server is complete, and you can start configuring backups as instructed below.

Configuring Google Drive Account for Backup Storage

As mentioned earlier, Ottomatik supports storing backups on cloud storage services like Google Drive, Dropbox, Amazon S3, DigitalOcean, and Backblaze. To configure your storage account, you can access the Storage interface as shown below.

screenshot 2023 11 06 21.23.45@2x

Next, click Add Storage and select the storage service you prefer.

screenshot 2023 11 06

Depending on the service you choose, there will be different setup methods. In this guide, we’ll focus on Google Drive. After selecting Google Drive, click the Get Token button in the next interface to obtain a connection token.

screenshot 2023 11 06 21.26.31@2x

Grant the necessary permissions for the token.

screenshot 2023 11 06 21.26.57@2x

Next, copy the token code provided by your web browser and paste it into the Authorization token field on the Ottomatik interface.

screenshot 2023 11 06

Once you’ve entered the token, click Add Storage.

screenshot 2023 11 06 21.28.43@2x

This completes the setup of your Google Drive account. In the future, you’ll only need to create backup jobs without reconfiguring the storage account.

Configuring MySQL Database Backup

To access the Parachutes interface for creating new backup tasks and managing existing ones.

screenshot 2023 11 06 21.17.13@2x

Next, press Create New to create a new backup task.

screenshot 2023 11 06 21.18.47@2x

Choose “backup Database” and select the type of database software you want to back up. Ottomatik currently supports backup for MySQL/MariaDB, MongoDB, and PostgreSQL databases.

screenshot 2023 11 06 21.19.52@2x

Select “My own server” as the storage server to store backups on your account.

screenshot 2023 11 06 21.21.13@2x

Continue by selecting “Connect my own storage.”

screenshot 2023 11 06 21.30.28@2x

And choose the storage account you previously configured.

screenshot 2023 11 06

In the next step, you will select the server that you want to perform the backup on => choose “Select an existing server” and select the server you added earlier.

screenshot 2023 11 06

Then, enter the account and database details for the backup task.

screenshot 2023 11 06 21.33.02@2x

Here are the details:

  • DB nickname: The name of the database you want to back up.
  • Database host: The database server you are using; you can leave it as 127.0.0.1 if the database is running on the same server.
  • Database port: The MySQL port, usually 3306 by default.
  • Database user: The name of the database user with access to the DB nickname mentioned earlier. If you created a separate user for backing up the database in the Ottomatik setup, you should enter it here.
  • Database password: The password for the database user above.

If you entered incorrect information, you can correct it by entering the database account you configured on the website. After entering the information, click Check and Save, if the information is valid and the connection is successful, proceed to the next step.

In the next step, you can choose the backup retention period, set a task name, and click Finalize Setup to complete the process.

screenshot 2023 11 06 21.48.01@2x

Once this is done, it will run the initial backup. You can check the progress in the Parachutes section.

Setting Up Backup File

You still need to access the Parachutes interface, select Create New to add a new task, and choose File.

screenshot 2023 11 06 21.50.08@2x

Continue by selecting “Connect my own storage,” choose the storage account, and select a server as you did in the previous steps. In the section for setting the file path, enter the folder path you want to back up; it will back up the data within that folder and any subfolders.

screenshot 2023 11 06 21.51.41@2x

In the next step, you can also set the task name, backup frequency, and click Finalize Setup to complete the process.

screenshot 2023 11 06 21.52.38@2x

This way, you have completed the File backup setup on your server using Ottomatik.

Conclusion

While Ottomatik offers straightforward usage and is cost-effective for truly important websites, the author of the article evaluates its effectiveness. It reduces the time and costs associated with backing-up systems with large amounts of data. Currently, the author uses this tool to back up databases up to 100GB in size, with a frequency of once per hour, and various File data, and it still operates very reliably.

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign