{"id":112816,"date":"2026-03-05T08:41:22","date_gmt":"2026-03-05T16:41:22","guid":{"rendered":"https:\/\/www.backblaze.com\/blog\/?p=112816"},"modified":"2026-03-05T08:41:24","modified_gmt":"2026-03-05T16:41:24","slug":"back-up-your-entire-openclaw-state-to-backblaze-b2","status":"publish","type":"post","link":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/","title":{"rendered":"Back Up Your Entire OpenClaw State to Backblaze B2"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1-1024x583.png\" alt=\"A decorative image showing a series of 0s and 1s. \" class=\"wp-image-112817\" srcset=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1-1024x583.png 1024w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1-300x171.png 300w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1-768x437.png 768w, https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>There\u2019s a new open-source plugin that snapshots your OpenClaw config, memory, and sessions to B2. It\u2019s designed to be as simple as possible: Three fields to configure. Rollback from chat. Migrate to a new machine in one restart.&nbsp;<\/p>\n\n\n\n<p>Let\u2019s get into how and why you might want to use it.<\/p>\n\n\n\n<p><strong>OpenClaw keeps everything local. That&#8217;s great until it isn&#8217;t.<\/strong><\/p>\n\n\n\n<p>Your config, sessions, memory databases, hooks, cron jobs\u2014everything that makes your OpenClaw instance <em>yours<\/em> lives on one machine with no built-in redundancy. Compaction can rewrite session transcripts and cause memory loss. A bad config edit or an accidental deletion means rebuilding from scratch: re-onboarding channels, re-pairing devices, re-teaching your agent who you are.<\/p>\n\n\n\n<p><code>openclaw-b2-backup<\/code> adds automatic encrypted backups to Backblaze B2 without changing how you use OpenClaw.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Three fields and you&#8217;re done<\/h2>\n\n\n\n<p>Setup is intentionally minimal:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">openclaw plugins install openclaw-b2-backup<\/pre>\n\n\n\n<p>Then open <code>~\/.openclaw\/openclaw.json<\/code> and add your B2 credentials to the entry the installer created:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{<br \/>  \"openclaw-b2-backup\": {<br \/>    \"enabled\": true,<br \/>    \"config\": {<br \/>      \"keyId\": \"004a...\",<br \/>      \"applicationKey\": \"K004...\",<br \/>      \"bucket\": \"my-openclaw-backups\"<br \/>    }<br \/>  }<br \/>}<\/pre>\n\n\n\n<p>Restart the gateway, and you&#8217;re done. Region is auto-detected from your application key. Encryption is on by default. The first backup runs at midnight, and then daily after that. You can change the schedule to weekly or any cron expression you like.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#e6e3ff\"><strong>Free tier friendly:<\/strong> Backblaze B2 includes 10GB of free storage. A typical OpenClaw state directory is 50\u2013500 MB, so even with 10 encrypted snapshots retained, you&#8217;ll comfortably stay within the free tier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Backups that actually happen<\/h2>\n\n\n\n<p>The hardest part of any backup system is remembering to run it. This plugin takes care of that with multiple automatic triggers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <strong>daily cron job<\/strong> (configurable) runs a full incremental push at midnight.\u00a0<\/li>\n\n\n\n<li>Every time you <strong>shut down the gateway<\/strong>, a final push runs before exit\u2014so you always have a snapshot of your latest state.\u00a0<\/li>\n\n\n\n<li>And, before <strong>compaction fires<\/strong> (the thing that rewrites your session transcripts and can cause memory loss), the plugin automatically pushes a snapshot. That last one is the one you&#8217;ll be most grateful for.<\/li>\n<\/ul>\n\n\n\n<p>There&#8217;s a 5-minute debounce on the compaction trigger, so rapid-fire compactions don&#8217;t queue up a dozen pushes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rolling back from chat<\/h2>\n\n\n\n<p>The plugin registers a <code>b2_rollback<\/code> tool with your agent, which means you can manage backups conversationally. Just tell your agent:<\/p>\n\n\n\n<p>&#8220;Show me my B2 backup snapshots&#8221;<\/p>\n\n\n\n<p>And it&#8217;ll list all available snapshots with timestamps. To restore one:<\/p>\n\n\n\n<p>&#8220;Roll back to the snapshot from before compaction&#8221;Before any restore, the plugin automatically creates a <strong>safety snapshot<\/strong> of your current state. Safety snapshots are stored separately and never auto-pruned, so you can always recover from a bad rollback. It&#8217;s an undo for your undo.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Moving to a new machine<\/h2>\n\n\n\n<p>This was one of the most requested use cases: Getting your entire OpenClaw setup onto a new machine without manually copying files and hoping you got everything.<\/p>\n\n\n\n<p>Install the plugin on your new machine, add the same B2 credentials, and restart. The plugin detects the empty state directory, finds your existing snapshots in B2, and automatically restores the latest one. Same memory, same sessions, same config, same personality. No manual file copying.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">openclaw plugins install openclaw-b2-backup<br \/># Add your B2 config to openclaw.json<br \/>openclaw gateway restart<br \/># Plugin detects empty state + existing snapshots \u2192 auto-restores latest<br \/><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Security by default<\/h2>\n\n\n\n<p>Everything is AES-256-GCM encrypted before it leaves your machine. Each file gets a random salt and IV, so identical files produce different ciphertext. The encryption key is derived from your B2 application key via scrypt\u2014no separate key to manage or lose.<\/p>\n\n\n\n<p>Manifests (which contain only file paths and SHA-256 hashes) stay unencrypted so incremental diffing works regardless of encryption. Credentials and auth profiles are excluded from sync by design\u2014secrets stay per-machine, and you re-auth on new machines.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:#e6e3ff\"><strong>Best practice:<\/strong> Use a B2 application key scoped to a single bucket for least-privilege access. The plugin works perfectly with bucket-scoped keys\u2014region is auto-detected from the authorize response.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Zero external dependencies<\/h2>\n\n\n\n<p>The plugin has no external runtime dependencies beyond <code>croner<\/code> for scheduling. The B2 client is a hand-rolled AWS Signature V4 implementation using only <code>node:crypto<\/code>. No AWS SDK, no S3 library, no heavyweight dependencies to audit or keep updated.<\/p>\n\n\n\n<p>It runs entirely inside the gateway process\u2014no external scripts, no separate cron daemon, no stopping the gateway to take backups.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Get started<\/h2>\n\n\n\n<p>The plugin is open source (under the MIT license) and available now:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">openclaw plugins install openclaw-b2-backup<\/pre>\n\n\n\n<p>Source code and full documentation: <a href=\"https:\/\/github.com\/backblaze-b2-samples\/openclaw-b2-sync-backup\" target=\"_blank\" rel=\"noreferrer noopener\">github.com\/backblaze-b2-samples\/openclaw-b2-sync-backup<\/a><\/p>\n\n\n\n<p>npm package: <a href=\"https:\/\/www.npmjs.com\/package\/openclaw-b2-backup\" target=\"_blank\" rel=\"noreferrer noopener\">npmjs.com\/package\/openclaw-b2-backup<\/a><\/p>\n\n\n\n<p>If you run into issues or have feature requests, open an issue on GitHub. And if this plugin saves you from a rebuild, we&#8217;d love to hear about it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Set up automatic, daily, and pre-compaction backups of your OpenClaw state to Backblaze B2 with the openclaw-b2-backup plugin&#8217;s minimal three-field configuration.<\/p>\n","protected":false},"author":220,"featured_media":112817,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[7,434,438,483],"tags":[489,468,373],"class_list":["post-112816","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-storage","category-featured-1","category-featured-cloud-storage","category-tech-lab","tag-ai-ml","tag-b2cloud","tag-developer","entry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Back Up Your Entire OpenClaw State to Backblaze B2<\/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:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Back Up Your Entire OpenClaw State to Backblaze B2\" \/>\n<meta property=\"og:description\" content=\"Set up automatic, daily, and pre-compaction backups of your OpenClaw state to Backblaze B2 with the openclaw-b2-backup plugin&#039;s minimal three-field configuration.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/\" \/>\n<meta property=\"og:site_name\" content=\"Backblaze Blog | Cloud Storage &amp; Cloud Backup\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/backblaze\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-05T16:41:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-05T16:41:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"820\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jeronimo De Leon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@backblaze\" \/>\n<meta name=\"twitter:site\" content=\"@backblaze\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeronimo De Leon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Back Up Your Entire OpenClaw State to Backblaze B2","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:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/","og_locale":"en_US","og_type":"article","og_title":"Back Up Your Entire OpenClaw State to Backblaze B2","og_description":"Set up automatic, daily, and pre-compaction backups of your OpenClaw state to Backblaze B2 with the openclaw-b2-backup plugin's minimal three-field configuration.","og_url":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/","og_site_name":"Backblaze Blog | Cloud Storage &amp; Cloud Backup","article_publisher":"https:\/\/www.facebook.com\/backblaze","article_published_time":"2026-03-05T16:41:22+00:00","article_modified_time":"2026-03-05T16:41:24+00:00","og_image":[{"width":1440,"height":820,"url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png","type":"image\/png"}],"author":"Jeronimo De Leon","twitter_card":"summary_large_image","twitter_creator":"@backblaze","twitter_site":"@backblaze","twitter_misc":{"Written by":"Jeronimo De Leon","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#article","isPartOf":{"@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/"},"author":{"name":"Jeronimo De Leon","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/person\/f370aeffc6ee12eaaec36fe5ab1d065f"},"headline":"Back Up Your Entire OpenClaw State to Backblaze B2","datePublished":"2026-03-05T16:41:22+00:00","dateModified":"2026-03-05T16:41:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/"},"wordCount":750,"commentCount":2,"publisher":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#primaryimage"},"thumbnailUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png","keywords":["AI\/ML","B2Cloud","Developer"],"articleSection":["Cloud Storage","Featured","Featured-Cloud Storage","Tech Lab"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/","url":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/","name":"Back Up Your Entire OpenClaw State to Backblaze B2","isPartOf":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#primaryimage"},"image":{"@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#primaryimage"},"thumbnailUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png","datePublished":"2026-03-05T16:41:22+00:00","dateModified":"2026-03-05T16:41:24+00:00","breadcrumb":{"@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#primaryimage","url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png","contentUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png","width":1440,"height":820,"caption":"A decorative image showing a series of 0s and 1s."},{"@type":"BreadcrumbList","@id":"https:\/\/www.backblaze.com\/blog\/back-up-your-entire-openclaw-state-to-backblaze-b2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Back Up Your Entire OpenClaw State to Backblaze B2"}]},{"@type":"WebSite","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#website","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/","name":"Backblaze Cloud Solutions Blog","description":"Cloud Storage &amp; Cloud Backup","publisher":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#organization","name":"Backblaze","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.backblaze.com\/blog\/wp-content\/uploads\/2017\/12\/backblaze_icon_transparent.png?fit=512%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.backblaze.com\/blog\/wp-content\/uploads\/2017\/12\/backblaze_icon_transparent.png?fit=512%2C512&ssl=1","width":512,"height":512,"caption":"Backblaze"},"image":{"@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/backblaze","https:\/\/x.com\/backblaze","https:\/\/www.youtube.com\/user\/Backblaze","https:\/\/en.wikipedia.org\/wiki\/Backblaze"]},{"@type":"Person","@id":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/#\/schema\/person\/f370aeffc6ee12eaaec36fe5ab1d065f","name":"Jeronimo De Leon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2025\/07\/Backblaze_Author_Jeronimo-De-Leon-150x150.jpg","url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2025\/07\/Backblaze_Author_Jeronimo-De-Leon-150x150.jpg","contentUrl":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2025\/07\/Backblaze_Author_Jeronimo-De-Leon-150x150.jpg","caption":"Jeronimo De Leon"},"description":"Jeronimo De Leon is a seasoned product management leader with over 10 years of experience driving AI-driven innovation across enterprise and startup environments. Currently serving as Senior Product Manager, AI at Backblaze, he leads the development of AI\/ML features, focuses on how Backblaze enhances the AI data lifecycle for customers' MLOps architectures, and implements AI tools and agents to optimize internal operations.","url":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/author\/jeronimodeleon\/"}]}},"jetpack_featured_media_url":"https:\/\/backblazeprod.wpenginepowered.com\/wp-content\/uploads\/2026\/03\/Q126-0004-Blog-Header-1440x820-1.png","_links":{"self":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts\/112816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/users\/220"}],"replies":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/comments?post=112816"}],"version-history":[{"count":0,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/posts\/112816\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/media\/112817"}],"wp:attachment":[{"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/media?parent=112816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/categories?post=112816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/backblazeprod.wpenginepowered.com\/blog\/wp-json\/wp\/v2\/tags?post=112816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}