{"id":620,"date":"2026-07-18T04:41:00","date_gmt":"2026-07-18T04:41:00","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=620"},"modified":"2026-07-18T04:41:00","modified_gmt":"2026-07-18T04:41:00","slug":"vps-backup-automation-rsync-restic-rclone","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/","title":{"rendered":"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Data loss is not a matter of &#8220;if&#8221; but &#8220;when&#8221; \u2014 a misconfigured script or accidental deletion can wipe months of work in seconds. Automated backups are your insurance policy. This guide covers three tools: rsync for simple file sync, Restic for encrypted snapshots, and Rclone for cloud storage. For help choosing a VPS with enough storage for backups, <a href=\"https:\/\/virtualserversvps.com\/#providers\">compare VPS providers on our comparison table<\/a>.<\/p><h2 class=\"wp-block-heading\">Why You Need Automated Backups<\/h2><ul class=\"wp-block-list\"><li>Recover from accidental file deletion or configuration errors (most common cause of data loss)<\/li><li>Restore after security breaches or ransomware attacks<\/li><li>Migrate between VPS providers without manual file transfers<\/li><li>Maintain point-in-time recovery for databases and application state<\/li><\/ul><p class=\"wp-block-paragraph\">Follow the 3-2-1 rule: three copies of your data, on two different media types, with one copy off-site (different provider or physical location).<\/p><h2 class=\"wp-block-heading\">Option 1: rsync \u2014 Simple File-Level Backups<\/h2><p class=\"wp-block-paragraph\">rsync transfers only changed blocks, making it ideal for backing up web roots and config files:<\/p><pre class=\"wp-block-code\"><code>#!\/bin\/bash\n# \/usr\/local\/bin\/backup-rsync.sh\nBACKUP_SRC=\"\/var\/www \/etc \/home\"\nBACKUP_DST=\"\/backup\/vps-daily\"\nREMOTE_HOST=\"backup@remote-storage.example.com\"\nREMOTE_PATH=\"\/backups\/$(hostname)\"\n\n# Local backup\nrsync -avz --delete --exclude=\"*.log\" --exclude=\"cache\/*\" \\\n    $BACKUP_SRC $BACKUP_DST\/\n\n# Remote backup (off-site)\nrsync -avz --delete -e \"ssh -i \/root\/.ssh\/backup_key\" \\\n    $BACKUP_SRC $REMOTE_HOST:$REMOTE_PATH\/<\/code><\/pre><h2 class=\"wp-block-heading\">Option 2: Restic \u2014 Encrypted, Deduplicated Snapshots<\/h2><p class=\"wp-block-paragraph\">Restic creates encrypted snapshots with automatic deduplication. Each backup only stores changed data, saving significant storage space. Backups are encrypted with AES-256 before leaving your server.<\/p><pre class=\"wp-block-code\"><code># Install restic\nsudo apt install -y restic\n\n# Initialize a repository\nrestic init --repo \/backup\/restic-repo\n\n# Create your first backup\nrestic --repo \/backup\/restic-repo backup \/var\/www \/etc \/home\n\n# View snapshots\nrestic --repo \/backup\/restic-repo snapshots<\/code><\/pre><p class=\"wp-block-paragraph\">Set up retention policies:<\/p><pre class=\"wp-block-code\"><code># Keep: 7 daily, 4 weekly, 6 monthly\nrestic --repo \/backup\/restic-repo forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune\n\n# Full automated backup script\n#!\/bin\/bash\nexport RESTIC_REPOSITORY=\"\/backup\/restic-repo\"\nexport RESTIC_PASSWORD=\"your-strong-password\"\nrestic backup \/var\/www \/etc \/home --exclude=\"*.log\" --tag=automated\nmysqldump --all-databases | restic backup --stdin --stdin-filename mysql-dump.sql --tag=mysql\nrestic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune<\/code><\/pre><h2 class=\"wp-block-heading\">Option 3: Rclone \u2014 Cloud Storage Backups<\/h2><p class=\"wp-block-paragraph\">Rclone syncs data to Backblaze B2, AWS S3, Google Cloud Storage, Wasabi, and 40+ other providers:<\/p><pre class=\"wp-block-code\"><code># Install rclone\nsudo -v ; curl https:\/\/rclone.org\/install.sh | sudo bash\n\n# Configure a remote (interactive)\nrclone config\n\n# Sync to cloud\nrclone sync \/var\/www backup-remote:my-vps-backups\/www \\\n    --progress --checksum --exclude=\"*.log\"<\/code><\/pre><p class=\"wp-block-paragraph\">Combine Restic with Rclone for encrypted cloud backups:<\/p><pre class=\"wp-block-code\"><code># Initialize Restic with rclone backend\nrestic init --repo rclone:backup-remote:restic-repo\n\n# Backup directly to cloud storage\nrestic --repo rclone:backup-remote:restic-repo backup \/var\/www \/etc\n\n# Automate\n#!\/bin\/bash\nexport RESTIC_REPOSITORY=\"rclone:backup-remote:restic-repo\"\nexport RESTIC_PASSWORD=\"your-password\"\nrestic backup \/var\/www \/etc \/home --exclude=\"*.log\"\nrestic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune<\/code><\/pre><h2 class=\"wp-block-heading\">Automating with Cron<\/h2><pre class=\"wp-block-code\"><code># Edit crontab: crontab -e\n\n# Daily backup at 2 AM\n0 2 * * * \/usr\/local\/bin\/backup-restic.sh &gt; \/var\/log\/backup.log 2&gt;&amp;1\n\n# Weekly full backup to cloud (Sunday 3 AM)\n0 3 * * 0 \/usr\/local\/bin\/backup-rclone.sh &gt; \/var\/log\/backup-cloud.log 2&gt;&amp;1\n\n# Database dump every 6 hours\n0 *\/6 * * * \/usr\/local\/bin\/backup-mysql.sh &gt; \/var\/log\/backup-db.log 2&gt;&amp;1<\/code><\/pre><p class=\"wp-block-paragraph\">Always test your backups:<\/p><pre class=\"wp-block-code\"><code>sudo \/usr\/local\/bin\/backup-restic.sh\ngrep backup \/var\/log\/syslog | tail -5\nrestic check --repo \/backup\/restic-repo<\/code><\/pre><h2 class=\"wp-block-heading\">Restoring from Backups<\/h2><p class=\"wp-block-paragraph\">Knowing how to restore matters more than the backup itself:<\/p><pre class=\"wp-block-code\"><code># Restore latest snapshot\nrestic --repo \/backup\/restic-repo restore latest --target \/restore\n\n# Restore specific files\nrestic --repo \/backup\/restic-repo restore latest \\\n    --include \/var\/www\/myapp --target \/tmp\/restore\n\n# Mount snapshot as filesystem\nrestic mount \/mnt\/restic-mount<\/code><\/pre><p class=\"wp-block-paragraph\">Automated backups are non-negotiable for any production VPS. Start with rsync, add Restic for encrypted deduplication, and use Rclone for off-site storage. For a VPS with scalable storage, consider <a href=\"https:\/\/interserver.net\/vps?id=1067805&amp;sid=virtualserversvps\" rel=\"noreferrer noopener sponsored\" target=\"_blank\">InterServer VPS<\/a> or <a href=\"https:\/\/cloudways.com\/en\/?id=2010927&amp;data1=virtualserversvps\" rel=\"noreferrer noopener sponsored\" target=\"_blank\">Cloudways managed VPS<\/a> for managed backups. Always <a href=\"https:\/\/virtualserversvps.com\/#providers\">compare VPS providers on our comparison table<\/a> before committing to a provider.<\/p>","protected":false},"excerpt":{"rendered":"<p>Data loss is not a matter of &#8220;if&#8221; but &#8220;when&#8221; \u2014 a misconfigured script or accidental deletion can wipe months of work in seconds. Automated backups are your insurance policy&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-620","post","type-post","status-publish","format-standard","hentry","category-vps-guides-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone - Virtual Servers VPS Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone\" \/>\n<meta property=\"og:description\" content=\"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-18T04:41:00+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/\",\"name\":\"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-07-18T04:41:00+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone - Virtual Servers VPS Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/","og_locale":"en_US","og_type":"article","og_title":"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone","og_description":"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone","og_url":"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-07-18T04:41:00+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/","url":"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/","name":"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-07-18T04:41:00+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/vps-backup-automation-rsync-restic-rclone\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Automate Your VPS Backups: A Practical Guide Using rsync, Restic, and Rclone"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=620"}],"version-history":[{"count":1,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/620\/revisions"}],"predecessor-version":[{"id":665,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/620\/revisions\/665"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}