Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The dependable pattern is a database-native dump, a timestamped and encrypted archive, an upload to storage outside the VPS, automatic retention, failure alerts, and scheduled restore tests. A cron job that merely creates a local file is not a complete backup system: disk loss, a compromised VPS, a bad upload, or an unusable dump can still leave you without a recovery path.

This guide shows how to build that workflow for PostgreSQL and MySQL, choose between logical dumps, filesystem or base backups, and continuous archiving, and verify that recovery actually works.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a complete VPS backup system must do

Design the job around two targets: your recovery point objective (RPO), the amount of recent data you can afford to lose, and your recovery time objective (RTO), how quickly the service must return. The schedule, backup method, storage and restore process should all follow those targets.

  1. Create a consistent database backup. Use pg_dump or pg_dumpall for PostgreSQL, and mysqldump for MySQL. For large PostgreSQL systems that need point-in-time recovery (PITR), use a base backup with WAL archiving rather than relying only on periodic dumps.
  2. Write a timestamped artifact. Include the database name and a UTC timestamp in the filename so operators can identify recovery points without opening the file.
  3. Protect and move it off the VPS. Compress where useful, encrypt the archive or repository, and upload it to separate object storage or another host. Keep at least one copy outside the VPS account or physical host.
  4. Apply retention. Keep enough daily, weekly and monthly recovery points for your business and prune older data automatically.
  5. Record and alert on every stage. A successful dump followed by a failed upload is a failed backup. Log dump, encryption, upload, verification, pruning and disk-space results separately.
  6. Prove recovery. Restore on a disposable database or host on a schedule. Check schemas, required rows, application credentials and service startup.

PostgreSQL’s version 17 backup documentation states that databases should be backed up regularly and describes SQL dumps, filesystem-level backups and continuous archiving as distinct approaches.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Choose the backup method before writing automation

Method Best fit Strengths Limitations
Logical dump (pg_dump or mysqldump) Most VPS databases and routine disaster recovery Portable, straightforward to inspect and restore, independent of the original data-directory layout Usually slower to restore for very large databases; periodic dumps alone do not provide continuous PITR
Filesystem or PostgreSQL base backup Large datasets where restore time matters Can reduce restore time compared with rebuilding a database from SQL Requires database-specific consistency procedures, compatible storage handling and careful shutdown or snapshot coordination
Continuous archiving with PITR Cases where recovery to a precise time is required Combines a base backup with WAL archiving so you can recover to a selected point in time More storage, monitoring and operational complexity than periodic dumps

Use logical dumps as the baseline when portability and simple inspection matter. Add filesystem or base backups when the database is too large for your RTO, and add PostgreSQL WAL archiving when the acceptable data loss is smaller than your dump interval.

Prepare a least-privilege backup identity

Do not put a database password directly in a shell command or a process argument. Store credentials in a root-readable configuration file or a secret store, and use a separate database identity with only the privileges needed to read the database and required metadata.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Create /usr/local/sbin/db-backup, owned by root:root and executable only by root, or run it as a dedicated backup service account.
  • Store the PostgreSQL connection information in a protected file such as /root/.pgpass with mode 0600. For MySQL, use a protected option file such as /root/.my.cnf with mode 0600.
  • Keep encryption keys separate from the VPS and from the backup directory when possible. A stolen VPS should not automatically grant access to every off-site archive.
  • Use encrypted transport to the remote destination and restrict the destination credentials to the bucket, repository or prefix used for backups.
  • Put logs outside the backup directory. If a local disk is damaged or the directory is deleted, the evidence of failed jobs should survive elsewhere.

Build a PostgreSQL backup script

pg_dump backs up one database. Use pg_dumpall when you also need cluster-wide objects such as roles and tablespaces. A normal database dump does not replace a base backup plus WAL archiving for PITR.

Example script with locking and upload hand-off

The following pattern creates a compressed custom-format dump, prevents overlapping runs, and leaves the resulting file for your encrypted repository client. Adjust names, paths and repository variables to your environment.

#!/usr/bin/env bash
set -Eeuo pipefail
umask 077

exec 9>/run/lock/postgres-backup.lock
flock -n 9 || { echo "backup already running" >&2; exit 1; }

DB_NAME="appdb"
OUT_DIR="/var/lib/db-backups/postgres"
STAMP="$(date -u +%Y%m%dT%H%M%SZ)"
FILE="$OUT_DIR/${DB_NAME}-${STAMP}.dump"
mkdir -p "$OUT_DIR"

pg_dump --format=custom --file="$FILE" "$DB_NAME"
test -s "$FILE"

# Hand the file to your encrypted off-site repository client here.
# Delete local copies only after the remote upload and verification succeed.

echo "created $FILE"

The lock is important because two dumps can compete for CPU, disk bandwidth or the same temporary files. The non-zero exit from pg_dump, an empty output check or a failed upload must make the job fail so the scheduler can alert.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Include roles and global objects when required

If a rebuild requires cluster roles or other global objects, run a separate pg_dumpall --globals-only and protect it like the database dump. Keep the global-object file paired with the corresponding recovery point. A database-only dump will not recreate everything needed by an installation that depends on those roles.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a MySQL backup script

For MySQL, mysqldump is the logical-dump equivalent. Choose options for the storage engine and workload, preserve routines when the application uses them, and ensure the dump is transactionally consistent for the tables being backed up.

#!/usr/bin/env bash
set -Eeuo pipefail
umask 077

exec 9>/run/lock/mysql-backup.lock
flock -n 9 || { echo "backup already running" >&2; exit 1; }

DB_NAME="appdb"
OUT_DIR="/var/lib/db-backups/mysql"
STAMP="$(date -u +%Y%m%dT%H%M%SZ)"
FILE="$OUT_DIR/${DB_NAME}-${STAMP}.sql.gz"
mkdir -p "$OUT_DIR"

mysqldump --single-transaction --routines "$DB_NAME" | gzip -c > "$FILE"
test -s "$FILE"

echo "created $FILE"
# Upload and verify through the encrypted repository client.
# Remove the local file only after a confirmed remote copy.

--single-transaction is appropriate for transactional tables, but it is not a universal consistency guarantee for every engine or workload. Confirm the result for your schema, and include routines if the application depends on stored procedures or functions. Before deleting the local file, verify that the compressed stream can be read and that the remote copy completed.

Encrypt and send backups off-site

Use an encrypted repository client

Restic provides encrypted repositories and supports S3, S3-compatible storage, SFTP, Azure Blob, Google Cloud Storage and other backends. The repository password or key must be protected separately from the VPS and the backup files.

Initialize a repository once, using credentials supplied through protected environment files or a secret manager rather than putting them in a command-line argument. Then add each completed dump and run the repository’s integrity and retention operations according to your policy. Keep the repository endpoint and credentials dedicated to backups so an application key cannot delete recovery points.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Borg is another option. It provides deduplication, compression, authenticated encryption and repositories reachable over SSH. Its borg prune command supports daily, weekly and monthly keep rules, which are useful for retaining several recovery horizons without keeping every dump forever.

Do not confuse an upload with a backup

An object-storage listing or a successful snapshot command proves only that metadata was written. It does not prove that the archive is complete, decryptable or restorable. Make verification an explicit stage and alert when it fails.

Schedule the job with cron or systemd

Cron

After making the script executable, test it interactively as the same identity that will run it:

sudo install -o root -g root -m 700 db-backup /usr/local/sbin/db-backup
sudo /usr/local/sbin/db-backup

A cron entry can run the script at a fixed UTC time. Redirect output to a log outside the backup directory and make sure a monitoring system receives failures:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
15 2 * * * root /usr/local/sbin/db-backup >>/var/log/db-backup.log 2>&1

Restic does not include a built-in scheduler; its documentation describes cron and systemd as the scheduling mechanisms and recommends preventing concurrent runs. The lock in the scripts above supplies that protection.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

systemd timer

A timer makes the schedule and service status visible through systemd. Create /etc/systemd/system/db-backup.service:

[Unit]
Description=Database backup

[Service]
Type=oneshot
ExecStart=/usr/local/sbin/db-backup

Then create /etc/systemd/system/db-backup.timer:

[Unit]
Description=Run database backup daily

[Timer]
OnCalendar=*-*-* 02:15:00 UTC
Persistent=true

[Install]
WantedBy=timers.target

Enable and run it:

sudo systemctl daemon-reload
sudo systemctl enable --now db-backup.timer
systemctl list-timers db-backup.timer
sudo systemctl start db-backup.service
sudo journalctl -u db-backup.service

Persistent=true allows a missed calendar run to be started when the VPS returns. Confirm that this behavior fits your load and that a delayed run will not overlap a manually started job; the lock remains necessary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Set retention without destroying your recovery window

Retention should reflect how far back users may need to recover, not merely how much disk is available. Keep several recent recovery points plus older daily, weekly and monthly points. Prune only after a newer copy has been uploaded and verified.

With Borg, express the policy through borg prune keep rules for daily, weekly and monthly archives. With Restic, configure its equivalent forget and prune operations and schedule them separately from the dump if pruning could make the backup job exceed its normal runtime. Monitor repository free space and alert before the destination refuses new archives.

Never let a cleanup command remove the only local copy before the off-site copy is confirmed. Also avoid storing logs inside a directory that retention or emergency cleanup can delete.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Test restores on a schedule

A restore drill is the only reliable check that your backup can be used. Perform it on a disposable VPS, isolated host or temporary database, using the same off-site destination and credentials path as production.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Select a recovery point and download or mount it without modifying the original repository.
  2. Verify the archive can be decrypted, opened and decompressed. For a PostgreSQL custom-format dump, inspect it with pg_restore --list; for a compressed MySQL dump, test the gzip stream before importing.
  3. Restore into a fresh database instance. Recreate required roles or global objects from the paired PostgreSQL globals file when applicable.
  4. Check that expected schemas, tables and representative recent rows exist. Include a few records that are important to the application, not just an empty schema.
  5. Configure the application to use the restored database and confirm that credentials, migrations and permissions work.
  6. Start the restored service and exercise a read path and a write path in the isolated environment.
  7. Record elapsed restore time, missing prerequisites and any manual steps. Update the runbook and repeat after major database or application changes.

Restore tests should use the same off-site destination used in production. A successful backup listing, snapshot status or upload response is not evidence that the application can recover.

Monitor failures and common break points

  • Dump fails: Check database connectivity, authentication, permissions, disk space and the command's exit status. Do not upload a partial file.
  • Upload fails: Keep the local artifact until retry succeeds, then alert if the off-site copy is outside the RPO window.
  • Backups overlap: Use flock or an equivalent service lock and investigate jobs that run longer than their interval.
  • Repository fills: Review retention, compression and prune logs; do not solve the problem by deleting the newest verified recovery points blindly.
  • Restore cannot open the file: Check encryption-key availability, repository integrity and whether the archive was truncated before upload.
  • Restored service will not start: Compare roles, credentials, extensions, routines, configuration and application migrations with production.
  • Local disk is lost: Recover logs and archives from the independent destination. This is why an off-site copy and separately protected keys are required.

When to move beyond nightly dumps

Periodic logical dumps are a sensible default when the database can be rebuilt within the RTO and losing data since the last dump is acceptable. Move to a PostgreSQL base backup plus WAL archiving when you need recovery to a precise time or when rebuilding a large dataset from SQL would take too long. Filesystem-level methods can also shorten restoration for large workloads, but only when consistency and storage compatibility are handled correctly.

Whichever method you choose, keep the operational controls unchanged: least-privilege credentials, encryption, off-site storage, locking, retention, alerting and regular restore drills.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.