{"id":38946,"date":"2022-10-28T10:09:12","date_gmt":"2022-10-28T08:09:12","guid":{"rendered":"https:\/\/www.inovex.de\/?p=38946"},"modified":"2022-11-21T15:48:31","modified_gmt":"2022-11-21T14:48:31","slug":"k3s-backup-litestream","status":"publish","type":"post","link":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/","title":{"rendered":"Backup K3s with Litestream"},"content":{"rendered":"<p>This blog post will give you a tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.<!--more--><\/p>\n<p>K3s is a lightweight Kubernetes distribution targeting Edge workloads and small-scale Kubernetes setups. It bundles many core components like the kubelet, all control plane components, a container runtime, and flannel as container network implementation into a single binary. The binary can be used for running both, a control plane node and a worker node. Another core feature of K3s is the support of sqlite3 or other SQL databases instead of etcd as storage for the Kubernetes API state. Using a single master node with a sqlite3 instead of etcd has many advantages since it reduces the overall complexity of the system. The setup has fewer components one has to master. Especially in Edge workloads, you do not need a load balancer to distribute the traffic to multiple Kubernetes API server nodes. What is more, sqlite3 is a very well-tested and well-known data store with a very low resource footprint. The cost of this setup is reduced resilience since a single master system cannot automatically mitigate hardware failures, or failover to another node during planned maintenance. Kubernetes is designed as an eventually consistent system, so during a control plane node downtime, the existing workload runs without interruption, but no new workload can be scheduled or auto-scaling cannot happen. This is often a valid trade-off to make for small-scale Kubernetes setups.<\/p>\n<p><a href=\"https:\/\/litestream.io\/\" target=\"_blank\" rel=\"noopener\">Litestream<\/a> can replicate a sqlite3 database to an object store, another file, or SFTP. Supported object store protocols are S3, Azure Blob Storage and Google Cloud Storage. <a href=\"https:\/\/github.com\/benbjohnson\" target=\"_blank\" rel=\"noopener\">Ben Johnson<\/a> is the author of Litestream, he also wrote the key-value store boltdb, initially used by etcd. Litestream uses the write-ahead log (WAL) feature of sqlite3 to offer point-in-time restores. Therefore, Litestream upon start copies a snapshot of the sqlite3 database to the replication target and after that subsequently copies the WAL files into the replication target as well. The default synchronization interval for WAL files is 1 second. A more detailed introduction to the motivation behind Litestream and the inner mechanism can be found on the Litestream <a href=\"https:\/\/litestream.io\/blog\/why-i-built-litestream\/\" target=\"_blank\" rel=\"noopener\">blog<\/a>.<\/p>\n<p>In the next few paragraphs, I want to show you an example setup of how to use sqlite3 to back up and restore a sqlite3 backed K3s control plane. To restore a K3s control plane of a running cluster, we only need the sqlite3 database and the<span style=\"font-weight: 400;\"> <code>K3S_TOKEN<\/code><\/span>\u00a0used for that cluster.<\/p>\n<h2>Step by Step Tutorial for a Backup with Litestream<\/h2>\n<p>This tutorial was written for Ubuntu 22.04. This should work for other Linux distributions as well, but you may need to use a different <a href=\"https:\/\/litestream.io\/install\/\" target=\"_blank\" rel=\"noopener\">Litestream installation process<\/a>. In this tutorial, we want to sync to a local minio installation. If you want to replicate this with another object store, skip the minio install and setup process. We start minio, via docker:<\/p>\n<p>Install docker if not already installed:<\/p>\n<pre class=\"lang:sh decode:true\">sudo docker ls || sudo snap install docker<\/pre>\n<p>Install jq and pwgen if not previously installed, we use these helper tools during the tutorial:<\/p>\n<pre class=\"lang:sh decode:true\">sudo apt-get update\r\nsudo apt-get install jq pwgen<\/pre>\n<p>Install a minio instance and create a bucket:<\/p>\n<pre class=\"lang:sh decode:true \" title=\"Install minio\"># Export credentials\r\nexport MINIO_USER=admin\r\nexport MINIO_PASSWORD=$(pwgen 16 1)\r\nexport MINIO_BUCKET_NAME=\u201ck3s-backup\u201c\r\n\t\r\n# Start Minio Server\r\nsudo -E sudo docker run -d --label k3s-tutorial=litestream -p 9000:9000 -p 9001:9001  -e \"MINIO_ROOT_USER=${MINIO_USER}\"  -e \"MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}\" quay.io\/minio\/minio server \/data --console-address \":9001\"\r\n\r\n# Get Host IP (first IPv4 which is not lo or docker0)\r\nexport MINIO_IP=$(ip -j a  | jq '.[] | select(.master!=\"docker0\" and .ifname!=\"lo\" and .ifname!=\"docker0\") |.addr_info[] | select(.family==\"inet\") | .local ' -r)\r\n\r\n# Save the MINIO URL\r\nexport MINIO_HOST=\u201chttp:\/\/${MINIO_USER}:${MINIO_PASSWORD}@${MINIO_IP}:9000\u201c\r\n\r\n# Create the bucket with the client tool\r\nsudo docker run --label k3s-tutorial=litestream -e \"MC_HOST_minio=${MINIO_HOST}\" quay.io\/minio\/mc mb minio\/${MINIO_BUCKET_NAME}\r\n<\/pre>\n<p>Install Litestream:<\/p>\n<pre class=\"lang:sh decode:true\">wget https:\/\/github.com\/benbjohnson\/litestream\/releases\/download\/v0.3.9\/litestream-v0.3.9-linux-amd64.deb\r\nsudo dpkg -i litestream-v0.3.9-linux-amd64.deb<\/pre>\n<p>After we have installed litestream, we can create a litestream configuration file:<\/p>\n<pre class=\"lang:default decode:true\">sudo -E sh -c \"cat &gt; \/etc\/litestream.yml\" &lt;&lt;EOF\r\naddr: \":9438\"\r\ndbs:\r\n    # K3s stores its state database here:\r\n  - path: \/var\/lib\/rancher\/k3s\/server\/db\/state.db\r\n    replicas:\r\n      # Store a replica in an s3 compatible storage, here minio. Use the credentials, host and buckets we used while setting up minio\r\n      - type: s3\r\n        bucket: ${MINIO_BUCKET_NAME}\r\n        path: state.db\r\n        endpoint: http:\/\/${MINIO_IP}:9000\r\n        access-key-id: ${MINIO_USER}\r\n        secret-access-key: ${MINIO_PASSWORD}\r\n        snapshot-interval: 1h\r\nEOF\r\n<\/pre>\n<p>Install K3s via the official install script:<\/p>\n<pre class=\"lang:sh decode:true\">export K3S_TOKEN=$(pwgen 16 1)\r\necho $K3S_TOKEN &gt; \/tmp\/k3s_token\r\n# We set the kubeconfig world readable for easier steps in the tutorial, in a production setup, you shouldn\u2019t do that\r\ncurl -sfL https:\/\/get.k3s.io |  sh -s - --write-kubeconfig-mode=644\r\n<\/pre>\n<p>Now, after we have installed K3s, we can start the Litestream replication:<\/p>\n<pre class=\"lang:sh decode:true \">sudo systemctl start litestream\r\nsudo systemctl enable litestream\r\n<\/pre>\n<p>With the Litestream tool, we can check the snapshots stored in our minio storage:<\/p>\n<pre class=\"lang:default decode:true\">litestream snapshots \/var\/lib\/rancher\/k3s\/server\/db\/state.db\r\nreplica  generation        index  size    created\r\ns3       625ada9e456b9d3b  3      602216  2022-09-20T11:31:35Z\r\n<\/pre>\n<p>We can see the data structure in minio bucket as well:<\/p>\n<pre class=\"lang:default decode:true\">sudo docker run -e \"MC_HOST_minio=${MINIO_HOST}\" quay.io\/minio\/mc tree minio\/${MINIO_BUCKET_NAME}\r\nminio\/k3s-backup\r\n\u2514\u2500 state.db\r\n   \u2514\u2500 generations\r\n      \u2514\u2500 625ada9e456b9d3b\r\n         \u251c\u2500 snapshots\r\n         \u2514\u2500 wal\r\n<\/pre>\n<p>After we have verified that our backup stores data at the target location, we can test the restore process. The most crucial step to verify a backup solution is to test the restoring process. To have some example data in our backup, we create a Kubernetes deployment:<\/p>\n<pre class=\"lang:default decode:true\">kubectl create deployment --image=nginx restore-test --replicas=2\r\ndeployment.apps\/restore-test created\r\n\r\nkubectl get deployments,pods\r\nNAME                           READY   UP-TO-DATE   AVAILABLE   AGE\r\ndeployment.apps\/restore-test   0\/2     2            0           7s\r\n\r\nNAME                                READY   STATUS              RESTARTS   AGE\r\npod\/restore-test-687fddf875-pdn84   0\/1     ContainerCreating   0          7s\r\npod\/restore-test-687fddf875-m4dgt   0\/1     ContainerCreating   0          7s\r\n<\/pre>\n<p>Now, let us uninstall K3s:<\/p>\n<pre class=\"lang:default decode:true\"># Run the uninstall script, K3s creates at installation time:\t\r\n\/usr\/local\/bin\/k3s-uninstall.sh\r\n\r\n# Check if there is still data present:\r\nsudo ls \/var\/lib\/rancher\/k3s\/server\/db\/state.db\r\nls: cannot access '\/var\/lib\/rancher\/k3s\/server\/db\/state.db': No such file or directory\r\n<\/pre>\n<p>Eventually, we have successfully uninstalled K3s and purged all data. The next step is to use Litestream to restore K3s sqlite database:<\/p>\n<pre class=\"lang:sh decode:true \">sudo litestream restore \/var\/lib\/rancher\/k3s\/server\/db\/state.db\r\n<\/pre>\n<p>The next step is to reinstall K3s with the same <span style=\"font-weight: 400;\"><code>K3S_TOKEN<\/code><\/span>\u00a0as before.<\/p>\n<pre class=\"lang:default decode:true\">export K3S_TOKEN=$(cat \/tmp\/k3s_token)\r\ncurl -sfL https:\/\/get.k3s.io | sh -s - --write-kubeconfig-mode=644<\/pre>\n<p>After the installation and restore, let\u2019s check if our deployment is still there:<\/p>\n<pre class=\"lang:default decode:true\">kubectl get pods,deployments\r\nNAME                                READY   STATUS    RESTARTS   AGE\r\npod\/restore-test-687fddf875-pdn84   1\/1     Running   1          7m11s\r\npod\/restore-test-687fddf875-m4dgt   1\/1     Running   1          7m11s\r\n\r\nNAME                           READY   UP-TO-DATE   AVAILABLE   AGE\r\ndeployment.apps\/restore-test   2\/2     2            2           7m11s\r\n<\/pre>\n<p>It is.<br \/>\nIf you want to automate the Litestream restore process, the <span style=\"font-weight: 400;\"><code>litestream restore<\/code><\/span>\u00a0command has two helpful flags:<\/p>\n<pre class=\"lang:default decode:true\">-if-db-not-exists\r\n    Returns exit code of 0 if the database already exists.\r\n\r\n-if-replica-exists\r\n    Returns exit code of 0 if no backups are found.\r\n<\/pre>\n<p>The first flag, \u201c-if-db-not-exists\u201c will only restore the database if there is no database currently present. If there is already a database, the file is not overwritten. \u201c-if-replica-exists\u201c will only restore, if there is a replica in the S3 bucket. Otherwise, it will return with code 0. This is helpful on first deployments. This allows restore the database before you install K3s:<span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<pre class=\"lang:default decode:true\">litestream restore -if-db-not-exists -if-replica-exists \/var\/lib\/rancher\/k3s\/server\/db\/state.db\r\nexport K3S_TOKEN=$(cat \/tmp\/k3s_token) \r\ncurl -sfL https:\/\/get.k3s.io |  sh -s - --write-kubeconfig-mode=644\r\n<\/pre>\n<p>This allows you in, e.g., Edge Setups or setups where you handle the control plane as cattle to not make a distinction between the first install and subsequent starts\/reinstallations.<\/p>\n<h2>Cleanup<\/h2>\n<p>Finally, let&#8217;s clean up our the K3s, litestream and minio installation:<\/p>\n<pre class=\"lang:default decode:true \"># Uninstall K3s\r\n\/usr\/local\/bin\/k3s-uninstall.sh\r\nrm -rf \/tmp\/k3s_token\r\n\t\r\n# Stop litestream process\r\nsudo systemctl stop litestream\r\nsudo systemctl disable litestream\r\n\r\n# Uninstall litestream\r\nsudo apt-get remove litestream\r\n\r\n# Remove all containers created during this tutorial\r\nsudo docker rm -f $(sudo docker ps -f label=\"k3s-tutorial=litestream\" -q)\r\n<\/pre>\n<p>That&#8217;s it. We have set up a database-level backup for our K3s clusters. This can be handy in lab setups, allowing you to revert your cluster to 3h ago, or in smaller installations where you only have a single control plane machine running. Be aware that if you restore a database-level backup of a Kubernetes cluster used by multiple tenants, there is a chance that you do a rollback of their applications if the backup is too old. Therefore, you should prefer a GitOps style workflow for your disaster recovery workflows, or ensure you continuously backup your cluster&#8217;s sqlite database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog post will give you a tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.<\/p>\n","protected":false},"author":33,"featured_media":39105,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"ep_exclude_from_search":false,"footnotes":""},"tags":[71,66,114],"service":[414,432,422,423],"coauthors":[{"id":33,"display_name":"Christoph Petrausch","user_nicename":"cpetrausch"}],"class_list":["post-38946","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cloud","tag-devops","tag-kubernetes","service-cloud","service-devops","service-it-engineering","service-kubernetes"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Backup K3s with Litestream - inovex GmbH<\/title>\n<meta name=\"description\" content=\"This blog post will give you a step by step tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.\" \/>\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.inovex.de\/de\/blog\/k3s-backup-litestream\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Backup K3s with Litestream - inovex GmbH\" \/>\n<meta property=\"og:description\" content=\"This blog post will give you a step by step tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/\" \/>\n<meta property=\"og:site_name\" content=\"inovex GmbH\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inovexde\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-28T08:09:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:48:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Christoph Petrausch\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream-1024x576.png\" \/>\n<meta name=\"twitter:creator\" content=\"@inovexgmbh\" \/>\n<meta name=\"twitter:site\" content=\"@inovexgmbh\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christoph Petrausch\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"8\u00a0Minuten\" \/>\n\t<meta name=\"twitter:label3\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data3\" content=\"Christoph Petrausch\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/\"},\"author\":{\"name\":\"Christoph Petrausch\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#\\\/schema\\\/person\\\/50e956dd05d9f8e78fd21af3c4d43aa4\"},\"headline\":\"Backup K3s with Litestream\",\"datePublished\":\"2022-10-28T08:09:12+00:00\",\"dateModified\":\"2022-11-21T14:48:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/\"},\"wordCount\":910,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/k3s-backup-litestream.png\",\"keywords\":[\"Cloud\",\"DevOps\",\"Kubernetes\"],\"articleSection\":[\"English Content\",\"General\",\"Infrastructure\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/\",\"url\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/\",\"name\":\"Backup K3s with Litestream - inovex GmbH\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/k3s-backup-litestream.png\",\"datePublished\":\"2022-10-28T08:09:12+00:00\",\"dateModified\":\"2022-11-21T14:48:31+00:00\",\"description\":\"This blog post will give you a step by step tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/k3s-backup-litestream.png\",\"contentUrl\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/k3s-backup-litestream.png\",\"width\":1920,\"height\":1080,\"caption\":\"Interwoven logos of k3s and litestream in a backup circle\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/k3s-backup-litestream\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backup K3s with Litestream\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#website\",\"url\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/\",\"name\":\"inovex GmbH\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#organization\",\"name\":\"inovex GmbH\",\"url\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/inovex-logo-16-9-1.png\",\"contentUrl\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/inovex-logo-16-9-1.png\",\"width\":1921,\"height\":1081,\"caption\":\"inovex GmbH\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inovexde\",\"https:\\\/\\\/x.com\\\/inovexgmbh\",\"https:\\\/\\\/www.instagram.com\\\/inovexlife\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inovex\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UC7r66GT14hROB_RQsQBAQUQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/#\\\/schema\\\/person\\\/50e956dd05d9f8e78fd21af3c4d43aa4\",\"name\":\"Christoph Petrausch\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/ChristophGopher-96x96.jpgcf9e8d784b562ae315f87ec9665b820b\",\"url\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/ChristophGopher-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/www.inovex.de\\\/wp-content\\\/uploads\\\/ChristophGopher-96x96.jpg\",\"caption\":\"Christoph Petrausch\"},\"url\":\"https:\\\/\\\/www.inovex.de\\\/de\\\/blog\\\/author\\\/cpetrausch\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Backup K3s with Litestream - inovex GmbH","description":"This blog post will give you a step by step tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.","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.inovex.de\/de\/blog\/k3s-backup-litestream\/","og_locale":"de_DE","og_type":"article","og_title":"Backup K3s with Litestream - inovex GmbH","og_description":"This blog post will give you a step by step tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.","og_url":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/","og_site_name":"inovex GmbH","article_publisher":"https:\/\/www.facebook.com\/inovexde","article_published_time":"2022-10-28T08:09:12+00:00","article_modified_time":"2022-11-21T14:48:31+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream.png","type":"image\/png"}],"author":"Christoph Petrausch","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream-1024x576.png","twitter_creator":"@inovexgmbh","twitter_site":"@inovexgmbh","twitter_misc":{"Verfasst von":"Christoph Petrausch","Gesch\u00e4tzte Lesezeit":"8\u00a0Minuten","Written by":"Christoph Petrausch"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#article","isPartOf":{"@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/"},"author":{"name":"Christoph Petrausch","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/50e956dd05d9f8e78fd21af3c4d43aa4"},"headline":"Backup K3s with Litestream","datePublished":"2022-10-28T08:09:12+00:00","dateModified":"2022-11-21T14:48:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/"},"wordCount":910,"commentCount":0,"publisher":{"@id":"https:\/\/www.inovex.de\/de\/#organization"},"image":{"@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream.png","keywords":["Cloud","DevOps","Kubernetes"],"articleSection":["English Content","General","Infrastructure"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/","url":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/","name":"Backup K3s with Litestream - inovex GmbH","isPartOf":{"@id":"https:\/\/www.inovex.de\/de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#primaryimage"},"image":{"@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream.png","datePublished":"2022-10-28T08:09:12+00:00","dateModified":"2022-11-21T14:48:31+00:00","description":"This blog post will give you a step by step tutorial on how to back up a K3s single node control plane backed by sqlite3 with Litestream.","breadcrumb":{"@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#primaryimage","url":"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream.png","contentUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/k3s-backup-litestream.png","width":1920,"height":1080,"caption":"Interwoven logos of k3s and litestream in a backup circle"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inovex.de\/de\/blog\/k3s-backup-litestream\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inovex.de\/de\/"},{"@type":"ListItem","position":2,"name":"Backup K3s with Litestream"}]},{"@type":"WebSite","@id":"https:\/\/www.inovex.de\/de\/#website","url":"https:\/\/www.inovex.de\/de\/","name":"inovex GmbH","description":"","publisher":{"@id":"https:\/\/www.inovex.de\/de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inovex.de\/de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/www.inovex.de\/de\/#organization","name":"inovex GmbH","url":"https:\/\/www.inovex.de\/de\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/","url":"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png","contentUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/2021\/03\/inovex-logo-16-9-1.png","width":1921,"height":1081,"caption":"inovex GmbH"},"image":{"@id":"https:\/\/www.inovex.de\/de\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inovexde","https:\/\/x.com\/inovexgmbh","https:\/\/www.instagram.com\/inovexlife\/","https:\/\/www.linkedin.com\/company\/inovex","https:\/\/www.youtube.com\/channel\/UC7r66GT14hROB_RQsQBAQUQ"]},{"@type":"Person","@id":"https:\/\/www.inovex.de\/de\/#\/schema\/person\/50e956dd05d9f8e78fd21af3c4d43aa4","name":"Christoph Petrausch","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.inovex.de\/wp-content\/uploads\/ChristophGopher-96x96.jpgcf9e8d784b562ae315f87ec9665b820b","url":"https:\/\/www.inovex.de\/wp-content\/uploads\/ChristophGopher-96x96.jpg","contentUrl":"https:\/\/www.inovex.de\/wp-content\/uploads\/ChristophGopher-96x96.jpg","caption":"Christoph Petrausch"},"url":"https:\/\/www.inovex.de\/de\/blog\/author\/cpetrausch\/"}]}},"_links":{"self":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/38946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/comments?post=38946"}],"version-history":[{"count":5,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/38946\/revisions"}],"predecessor-version":[{"id":39041,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/posts\/38946\/revisions\/39041"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/media\/39105"}],"wp:attachment":[{"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/media?parent=38946"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/tags?post=38946"},{"taxonomy":"service","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/service?post=38946"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.inovex.de\/de\/wp-json\/wp\/v2\/coauthors?post=38946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}