The dependable pattern is a root-owned script that runs mysqldump at minute zero of every hour, writes a compressed dump to a directory outside the web root, publishes it only after a successful run, enforces retention, and copies important files off the VPS. You also need a restore test: a dump that has never been restored is only an assumption, not a verified backup.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What an hourly MySQL backup actually gives you
mysqldump makes a logical backup: a text stream of SQL statements that can recreate database objects and table data. The resulting file is portable and easy to inspect, but restoring it requires MySQL to execute every statement, so restore speed depends on database size and server capacity.
As an Amazon Associate I earn from qualifying purchases.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchFor InnoDB tables, --single-transaction starts a consistent transaction and normally needs only a brief initial lock. It allows an online dump while applications continue to read and write. It is not a universal consistency switch: nontransactional tables, DDL executed during the dump, and unusual engine-specific behavior can still require a different approach.
An hourly copy is one recovery point per hour. It does not by itself provide point-in-time recovery between those copies. If that matters, retain binary logs for the required window and use --source-data (and, where appropriate, coordinated log flushing) so the dump records the binary-log coordinates needed to replay changes.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Before you automate: define the recovery policy
- Recovery point objective (RPO): Decide how much data you can lose. An hourly schedule can leave up to nearly an hour of changes without binary-log replay.
- Recovery time objective (RTO): Estimate how quickly a dump must be loaded. Logical dumps are simple but can be slow for large databases.
- Retention: Choose how many hourly, daily, and monthly copies you need, based on legal, operational, and storage requirements.
- Failure handling: Decide where a failed job is logged and who receives an alert.
- Separation: Keep at least one copy on another host or in object storage. A VPS failure, filesystem corruption, ransomware event, or accidental deletion can destroy every local copy.
Oracle’s backup guidance emphasizes that useful backups must be scheduled regularly. Scheduling is only the beginning: retention, monitoring, off-site copies, and restoration checks complete the policy.
Create a least-privilege MySQL backup account
Do not run routine dumps with the unrestricted administrative account. Create a dedicated account and grant access only to the databases it must back up. The exact privileges depend on the options and MySQL version, but a typical logical dump needs SELECT, SHOW VIEW, and TRIGGER. LOCK TABLES, PROCESS, and RELOAD (or FLUSH_TABLES in relevant configurations) may be needed for particular locking, GTID, tablespace, or log-flush options.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsRun the following interactively as an administrator, replacing the database name, account name, host restriction, and password with your values:
CREATE USER 'backup_hourly'@'localhost' IDENTIFIED BY 'use-a-long-random-password';
GRANT SELECT, SHOW VIEW, TRIGGER ON `DB_NAME`.* TO 'backup_hourly'@'localhost';
FLUSH PRIVILEGES;
If you dump several databases, grant the required privileges on each one rather than granting global access. If you add routines or events, verify that the account and server policy permit reading those objects; test the exact command before putting it in cron.
Store credentials in a protected option file
Putting a password in a command line exposes it through shell history, process listings, and sometimes cron diagnostics. Put client credentials in a file readable only by root. For a root-run job, create /root/.my.cnf:
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
cat > /root/.my.cnf <<'EOF'
[client]
host=localhost
user=backup_hourly
password=use-a-long-random-password
EOF
chmod 600 /root/.my.cnf
Check ownership as well as mode:
chown root:root /root/.my.cnf
ls -l /root/.my.cnf
Use --defaults-extra-file=/root/.my.cnf in the dump and restore commands. Keep this file out of web-served directories and out of source control.
Build an atomic, compressed hourly backup script
The script below backs up one database. It creates the destination outside the web root, timestamps files in UTC, compresses the SQL stream, fails if either mysqldump or gzip fails, and renames a temporary file only after success. That final rename prevents a partial dump from looking complete to a restore job.
cat > /usr/local/sbin/mysql-hourly-backup <<'EOF'
#!/bin/bash
set -Eeuo pipefail
BACKUP_DIR=/var/backups/mysql
DB_NAME=DB_NAME
RETENTION_DAYS=14
STAMP=$(date -u +%Y%m%dT%H00Z)
FINAL="$BACKUP_DIR/${DB_NAME}-${STAMP}.sql.gz"
TEMP="${FINAL}.tmp.$$"
install -d -o root -g root -m 700 "$BACKUP_DIR"
cleanup() {
rm -f -- "$TEMP"
}
trap cleanup EXIT
/usr/bin/mysqldump
--defaults-extra-file=/root/.my.cnf
--single-transaction
--routines
--events
--triggers
--databases "$DB_NAME"
| /bin/gzip -c > "$TEMP"
mv -f -- "$TEMP" "$FINAL"
# Delete old files only after this run has produced a complete dump.
find "$BACKUP_DIR" -type f -name "${DB_NAME}-*.sql.gz"
-mtime +"$RETENTION_DAYS" -delete
EOF
chmod 700 /usr/local/sbin/mysql-hourly-backup
chown root:root /usr/local/sbin/mysql-hourly-backup
set -o pipefail is important: without it, a successful gzip process could hide a failed dump. The temporary name includes the process ID so concurrent invocations do not overwrite one another. The retention command runs only after the new file is moved into place; if the dump fails, old recovery points remain.
For multiple databases, either repeat the dump in a controlled loop and produce one file per database, or use a carefully reviewed --databases list. Keep each temporary file separate and make the job fail if any database fails. Before scheduling, run the script manually and inspect the archive:
/usr/local/sbin/mysql-hourly-backup
ls -lh /var/backups/mysql
gunzip -t /var/backups/mysql/DB_NAME-*.sql.gz
The gunzip -t check validates gzip integrity; it does not prove that MySQL can execute the SQL. That requires an isolated restore.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Schedule the job at the start of every hour
With cron, place this line in /etc/crontab:
0 * * * * root /usr/local/sbin/mysql-hourly-backup >> /var/log/mysql-hourly-backup.log 2>&1
The five-field schedule means minute zero of every hour. Ensure the log is root-readable and rotated; otherwise a verbose failure can consume the VPS disk. You can instead send output to the system journal and alert on a nonzero exit status. A systemd timer is equally valid, especially when you want explicit dependency ordering, missed-run behavior, and journal integration.
Confirm the scheduler is active, then verify that a new file appears after the next run. A successful command with no output is not enough evidence: inspect the timestamp, size, ownership, and log entry. Alert if a run exits nonzero, produces an unexpectedly small file, or has not produced a file within the expected interval.
Retention, disk space, and off-site copies
Choose retention deliberately
Fourteen days in the example is only a configuration value, not a universal recommendation. Hourly files multiply quickly, particularly when a database contains large binary columns. Calculate the worst-case retained size, reserve room for a temporary dump (which can briefly require the uncompressed stream plus the compressed file), and monitor free space.
Protect the backup directory
- Keep
/var/backups/mysqloutside the document root. - Use root ownership and restrictive permissions.
- Exclude the directory from application users that do not need restore access.
- Monitor filesystem usage and inode usage, not just backup exit codes.
- Do not allow retention cleanup to run when the new dump was only partially written.
Copy important files elsewhere
After a local dump is finalized, copy selected hourly or daily files to a separate server or object-storage bucket. Use an encrypted transport or client-side encryption, restrict the destination credentials to the backup path, and preserve the UTC timestamp. Treat off-site storage as a second failure domain, not as a replacement for local restore testing. MySQL Shell documentation describes cloud-oriented dump workflows, including object storage integrations, when that operating model is preferable.
Add point-in-time recovery when hourly copies are not enough
For point-in-time recovery, include --source-data so the dump records the binary-log position (or corresponding coordinates supported by your MySQL setup). Keep binary logs for at least the period in which you may need to replay changes. If you use --flush-logs, coordinate it with replication and log-retention rules; never purge logs that a replica or recovery procedure still needs.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
The practical recovery chain is a known-good full dump, followed by the binary logs up to the desired time. Test that chain in a disposable environment rather than assuming that recorded coordinates, permissions, and log files will work under pressure.
Restore and verify every backup type
Use a disposable MySQL instance or an isolated database with matching major-version behavior. Do not overwrite production during a first test. Create the target schema, then restore the compressed dump:
Free tools Windows power users keep installed
One-click scans. No signup required.
mysql --defaults-extra-file=/root/.my.cnf -e 'CREATE DATABASE RESTORE_DB;'
gunzip -c /var/backups/mysql/DB_NAME-<timestamp>.sql.gz
| mysql --defaults-extra-file=/root/.my.cnf RESTORE_DB
If the dump was created with --databases, it may contain CREATE DATABASE and USE statements. In that case, review the SQL and restore into an isolated server or adjust the target workflow so you do not accidentally modify the wrong database.
Verification should include all of the following:
- The restore command exits successfully and reports no unnoticed SQL errors.
- Expected tables exist, and row counts are plausible compared with production.
- Views, stored routines, events, and triggers are present and compile.
- Representative application queries and critical read paths work.
- Character sets, collations, time-zone behavior, and foreign-key relationships are correct.
- Application users have the intended permissions, while the backup account has no unnecessary write access.
- If point-in-time recovery is required, binary logs replay to a selected timestamp in the sandbox.
Record the restore duration and any manual steps. Repeat on a schedule that matches the importance of the data. Red Hat guidance likewise recommends restoring in a sandbox and checking the recovered data, rather than treating file creation as proof.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Choose a tool that fits database size and recovery targets
| Approach | Best fit | Online behavior and performance | Operational considerations |
|---|---|---|---|
mysqldump |
Small to medium databases, broad availability, straightforward SQL portability | --single-transaction gives consistent InnoDB snapshots with a brief initial lock; dump and restore are generally serial |
Simple to script and compress; restore can be slow as data volume grows |
| MySQL Shell dump utilities | Larger datasets or workflows needing parallelism, progress reporting, compression, or cloud streaming | Parallel dump/load can reduce elapsed time; exact behavior depends on the selected utility and schema | More moving parts and operational knowledge than a single client command |
| MySQL Enterprise Backup | Large installations with strict recovery-time requirements and a preference for physical backups | Physical data-file copying is designed for faster large-scale restore than replaying a very large SQL stream | Commercial licensing and a more specialized operational process |
Oracle describes physical backup as more appropriate for large-scale backup and restore because original-format data files can be restored quickly. That does not make a physical tool automatically better: licensing, storage, version compatibility, backup windows, and staff expertise all matter. A common strategy is to keep logical dumps for portability and object-level recovery while adding a physical or parallel method when restore-time objectives demand it.
Best Value
Troubleshoot common failures
The cron job runs but no file appears
Run the script manually as root, inspect the redirected log or journal, and check the absolute paths to mysqldump and gzip. Cron has a smaller environment than an interactive shell. Confirm that /root/.my.cnf is readable by root, the account can connect through the configured socket or host, and the destination filesystem is writable.
The file exists but is tiny or incomplete
Check the exit status and the log. Verify pipefail is enabled and that the script uses a temporary file followed by mv. A missing final rename usually indicates a failed dump. Test the archive with gunzip -t, then perform a real restore.
Permission or missing-object errors appear
Compare the dump options with the backup account grants. Routines, events, triggers, GTID metadata, tablespace information, and log-flush features can require privileges beyond basic row reads. Grant only the missing capability that your chosen option genuinely needs, then rerun the test.
The job fills the disk
Measure dump size, compression ratio, retention count, and temporary peak usage. Reduce retention only after confirming off-site copies and policy requirements, move archives to separate storage, or switch to a tool and storage design suited to the database volume. Never let emergency cleanup delete the only recent, verified copy.
Restores are too slow
Measure rather than guess. Large SQL streams may need parallel dump/load utilities or physical backup tooling. Improve the restore environment and test with representative data; a faster dump that cannot be restored within the required window does not meet the recovery objective.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Hourly-backup checklist
- List the databases, retention period, RPO, RTO, and point-in-time requirement.
- Create a dedicated account with only the privileges required by the selected options.
- Put credentials in a root-owned option file with mode
600. - Install a root-owned script using UTC names, compression,
set -o pipefail, temporary files, and atomic publication. - Run it manually; inspect the archive, ownership, size, and logs.
- Schedule
0 * * * *in cron or configure an equivalent systemd timer. - Alert on nonzero exits, missed files, abnormal sizes, and low disk space.
- Copy important dumps to a separate failure domain.
- Retain binary logs when point-in-time recovery is required, and coordinate any log flushing.
- Restore into an isolated instance, validate data and objects, and document the elapsed time and procedure.
Frequently Asked Questions
Can I put the MySQL password directly in the cron line?
Avoid it. Use a root-readable client option file such as /root/.my.cnf with mode 600, then reference it with --defaults-extra-file.
Does an hourly dump capture every change made during the hour?
It captures a consistent snapshot at the time the dump runs. Changes after that snapshot require another dump or binary-log replay for point-in-time recovery.
Is gzip integrity testing the same as a restore test?
No. gunzip -t checks compression integrity; only loading the SQL into an isolated MySQL instance and checking objects and data verifies restorability.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools




