Guide to Installing Free Tools for Automated Website and Database Backups on Any Linux OS

VPTS Team Content has been moderated
Published date:17/6/2025 Update:17/6/2025 Views:150 Reviews: 4.7/580reviews
VPTS on

In the process of operating websites and database systems, periodic data backup is an indispensable step to ensure safety and minimize risks when incidents occur. However,...

In the process of operating websites and database systems, periodic data backup is an indispensable step to ensure safety and minimize risks when incidents occur. However, manual backup is often time-consuming, easy to forget, or inconsistently performed across servers.

Therefore, in this article, VPTS will guide you on how to install and configure free tools to automate website and database backups across all popular Linux operating systems today.
This solution is not only free and easy to deploy, but also flexibly customizable for various web applications such as WordPress, Laravel, or custom-built systems.

In professional website operation environments, periodic data backup is a vital factor to ensure information security and maintain continuous operations. This article will guide you on how to set up an automated backup tools system for websites and MySQL databases, compatible with all Linux operating systems such as Ubuntu, CentOS, AlmaLinux, etc.

Buy VPS at VPTS

Infrastructure using backup tools

In this Tools Backup system, we deploy on VPS provided byVPTS:
VPS No. 1 – Main Server - Refer to purchasing VPS via the following link: /cloud-vps-nvme/
Optional if you already have a VPS and can already host a website.
Operating system: Ubuntu, AlmaLinux, CentOS
Hosting service on VPS:aaPanel
Store websites and MySQL databases

VPS No. 2 – Cloud Storage Server - Refer to purchasing VPS via the following link:/cloud-storage/
Operating system: Optional Linux (Ubuntu, CentOS, AlmaLinux are all supported
Used to store backup data from the main VPS

Key features of backup tools

  • Auto-backup website directory

  • Back up the entire MySQL database
  • Send backup files to a remote storage VPS via SSH
  • Save logs, report errors, and send detailed notification emails
  • Option for automated daily runs via systemd timer
  • Supports all popular Linux operating systems 

Download file that automatically downloads and installs backup tools

Copy
if [ -f /etc/redhat-release ]; then yum update -y && yum install -y wget; elif [ -f /etc/debian_version ]; then sudo apt update -y && sudo apt install -y wget; fi && wget -O toolsbackupvpsttt.sh https://sharettt.com/multimedia/toolsbackupvpsttt.sh && chmod +x toolsbackupvpsttt.sh && ./toolsbackupvpsttt.sh | tee toolsbackupvpsttt.log

Run the backup tools config menu

Copy
/usr/local/bin/backupvpsttt
tools backup

First, edit the backup tool configuration with the first option

free tools backup

Explanation:
📌 Line 1 – Backup storage VPS IP
Nhập IP VPS lưu backup (hiện tại: 103.238.234.73 nhấn enter để giữ nguyên):
This is the public IP address of the VPS acting asbackup data storage server.
Users enter a new IP if they wish to change it, or press Enter to keep it as is.
📌 Line 2 – VPS Username
Nhập username VPS (hiện tại: root nhấn enter để giữ nguyên):
SSH account used to connect to the backup VPS. The default is usuallyroot, but another user can be used if appropriate permissions are granted.

📌 Line 3 – VPS SSH Password
Nhập password VPS (hiện tại: KXW0HN&%SY# nhấn enter để giữ nguyên):
SSH password for the account above, used bysshpassto automate connections and file transfers.
📌 Line 4 – Backup storage directory (on backup VPS)
Nhập thư mục lưu backup (hiện tại: /home nhấn enter để giữ nguyên):
Is the root directory where backup files will be stored on the storage VPS.
The system will automatically create time-based subdirectories such as/home/12_06_2025_01_00_00/

.📌 Line 5 – Directory to backup (on primary VPS)
Nhập thư mục cần backup (hiện tại: /www/wwwroot/booking.devttt.com/ nhấn enter để giữ nguyên):
Directory containingwebsite source codeor data to back up.
For systems usingaaPanel, usually located in/www/wwwroot/tên_miền/.
📌 Line 6 – MySQL Account
Nhập tài khoản MySQL (hiện tại: sql_booking_devt nhấn enter để giữ nguyên):
MySQL username with read permissions across the entire database.
Used in commandmysqldump.

📌 Line 7 – MySQL Password
Nhập mật khẩu MySQL (hiện tại: EwfwKEZ6aXhXptRN nhấn enter để giữ nguyên):
Password for the MySQL user above.
If entered incorrectly, the script will not be able to back up the database.
✅ Notification line upon completion
✔️ Đã cập nhật cấu hình backup thành công!
Nhấn Enter để quay lại menu...

Next, edit the backup tool's email configuration with the second option

Screenshot 2025-06-17 165131

Explanation:
📌 Line 1 – SMTP Server
Nhập SMTP Server (hiện tại: smtp.gmail.com nhấn enter để giữ nguyên):
This is the outgoing email server address (SMTP).
Commonly used:
Gmail: smtp.gmail.com
Zoho: smtp.zoho.com
Outlook: smtp.office365.com
📌 Line 2 – SMTP Port
Nhập SMTP Port (hiện tại: 465 nhấn enter để giữ nguyên):
SMTP connection port:
465: SSL (high security – common)
587: TLS (also supported)

📌 Line 3 – SMTP User
Nhập SMTP User (hiện tại: [email protected] nhấn enter để giữ nguyên):
Email account used to send notifications.
This is the address that appears in the "From" field when receiving backup report emails.

📌 Line 4 – SMTP Password
Nhập SMTP Password (hiện tại: mvbczbafopzmkind nhấn enter để giữ nguyên):
Is the App Password of the outgoing email.
If you use Gmail, you need to enable 2-step verification and generate an App Password in Google security settings.

📌 Line 5 – Notification email
Nhập Email nhận thông báo (hiện tại: [email protected] nhấn enter để giữ nguyên):
The email address willreceive backup result reports, including timestamp, size, errors (if any)...
Multiple recipients can be entered (separated by commas) if needed.
✅ Configuration complete
✔️ Đã cập nhật cấu hình email thành công!
Nhấn Enter để quay lại menu...

Other options

Option 3 lets you review current configurations and check for mistakes. Option 4 lets you test the SSH connection to the storage VPS. Option 5 lets you test the MySQL connection. Option 6 lets you run a manual backup to the storage VPS.

Change schedule settings to automatically run backup tools to storage VPS

Copy
nano /etc/systemd/system/backupvpsttt.timer
Screenshot_1

Save the configuration by pressing Ctrl + X -> Y -> Enter

Some results from backup tool systems

Image of data storage on storage VPS

Screenshot_2_final

Image of email notification after performing backup

Screenshot_3

VPTS – Comprehensive Digital Infrastructure Solutions Provider

VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.

Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.

VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.

VPTS Team Contact Information