{"id":378,"date":"2024-04-30T11:47:47","date_gmt":"2024-04-30T09:47:47","guid":{"rendered":"https:\/\/www.codeschoepfer.de\/?p=378"},"modified":"2024-06-08T12:41:50","modified_gmt":"2024-06-08T10:41:50","slug":"a-backup-strategy-through-the-power-of-ansible-and-restic","status":"publish","type":"post","link":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/","title":{"rendered":"A Backup Strategy through the Power of Ansible and Restic"},"content":{"rendered":"<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/04\/restic-blog-960_480.jpg\" alt=\"Ansible\" class=\"img-float-left\" \/> As a Free Software company we also have to deal with Windows servers. Especially in the operation of these Windows server systems we try to use Free Software components on them. In this article we are going to explain a combination of <a href=\"https:\/\/restic.net\/\">Restic<\/a> and <a href=\"https:\/\/www.ansible.com\/\">Ansible<\/a> to Backup a Windows server system.<\/p>\n<\/p>\n<p>Restic is a Free Software which provides fast, secure, and efficient data backup solutions. It supports various backends for storing backups, including local file systems, cloud storage services, and SFTP servers. With features like encryption, deduplication, and incremental backups, Restic ensures that data is not only safely backed up but also optimally stored, reducing storage requirements and backup time.<\/p>\n<p>Ansible is an automation tool used for application deployment, configuration management, and task automation. It uses YAML for its playbook scripts, making it easy to define tasks and ensure idempotent operations, meaning repeated tasks will produce the same results, ensuring consistency across environments. <em>Setting up Ansible is not scope of this article<\/em><\/p>\n<h2>Backup Strategy Snapshot or File-based?<\/h2>\n<p>Normally we are using snapshot backups to reduce our system-wide recovery efforts. These snapshots capture the complete state of a system at any given moment, ensuring we can rapidly restore entire systems when necessary. However, we recognize their limitations for individual file or database restoration, which can become complex without tailored solutions, despite the adaptability offered by serval cloud platforms and for example TrueNAS.<\/p>\n<p>To address the need for more granular recovery capabilities, we integrate Restic into our backup strategy. Restic allows us to perform precise, file-level backups, enabling selective data recovery that complements our broader snapshot backup approach. With Restic, we enhance our data protection framework by adding a layer of flexibility and security, leveraging features like encryption and deduplication for efficient and secure data management.<\/p>\n<p>That would mean we need to drive both, snapshot and file based backups. Lets focus on the Restic part.<\/p>\n<h2>Restic and Windows &#8211; VSS for Comprehensive Backups<\/h2>\n<p>Restic uses the Volume Shadow Copy Service (VSS) in the Windows environment, enabling it to back up open and locked files seamlessly. This integration ensures that Restic can capture a consistent snapshot of the filesystem, vital for databases and services requiring uninterrupted operation. With automated management of VSS snapshots, Restic combines efficiency with thorough data protection.<\/p>\n<p>Restic allows to use features like encryption and deduplication well known on GNU\/Linux on Windows as well as amd it is able to handle the complexities of a Windows filesystem through VSS.<\/p>\n<blockquote>\n<p>A Brief Note on Borg Backup<br \/>\nWhile Restic is tailored for cross-platform use with advanced Windows support, Borg Backup offers specialized efficiency for GNU\/Linux and UNIX-like systems. Known for its deduplication, compression, and encryption, Borg provides a reliable backup solution where Windows support isn&#8217;t a primary concern, making it a strong option for non-Windows environments.<\/p>\n<\/blockquote>\n<h2>Introduction to Restic<\/h2>\n<p>Next, we will explain the steps needed to configure Restic for using an SFTP backend, simplifying the process. More complex backends are thinkable for example you can also use S3 Storage like Minio. You can find a list on <a href=\"https:\/\/restic.readthedocs.io\/en\/stable\/030_preparing_a_new_repo.html#\">Restic-Docs<\/a> <\/p>\n<p>Here&#8217;s a guide to setting up Restic on Windows, along with steps to create a backup repository, perform backups, and restore data.<\/p>\n<h2>Setup Restic on Windows<\/h2>\n<h3>Deploy Restic with Chocolatey<\/h3>\n<p>We use an ansible playbook also to install Restic. There are multiple ways to install Restic by using a package manager like Scoop or Chocolatey or by copying the binary from <a href=\"https:\/\/github.com\/restic\/restic\">Github<\/a>. We use an Ansible playbook to install Chocolatey and Restic at the same time.<\/p>\n<p><strong>Playbook<\/strong><\/p>\n<pre><code class=\"language-yaml\">---\n# Deploy Restic on Windows\n- name: Install Chocolatey and Restic\n  hosts: restic-showcase\n  gather_facts: false\n  become: true\n\n  tasks:\n  - name: Install Chocolatey - a Windows Package Manager\n    win_shell: |\n      Set-ExecutionPolicy Bypass -Scope Process -Force\n      [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072\n      iex ((New-Object System.Net.WebClient).DownloadString('https:\/\/community.chocolatey.org\/install.ps1'))\n\n  - name: Install Restic via Chocolatey\n    win_shell: |\n      choco install -y restic<\/code><\/pre>\n<p>The playblook can be executed as follows:<\/p>\n<pre><code class=\"language-bash\">\u279c ansible-playbook -i hosts.ini restic-install.yaml\n[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details\n\nPLAY [Install Chocolatey and Restic] ****************************************************************************************************************************************************\n\nTASK [Install Chocolatey - a Windows Package Manager] ***********************************************************************************************************************************\nchanged: [restic-host]\n\nTASK [Install Restic via Chocolatey] ****************************************************************************************************************************************************\nchanged: [restic-host]\n\nPLAY RECAP ******************************************************************************************************************************************************************************\nrestic-host                : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   <\/code><\/pre>\n<h2>Creating a Backup Repository<\/h2>\n<p>To provide a clear and detailed guide, the setup process is explained step-by-step through manual operations.<\/p>\n<p>We&#8217;re focusing on a Windows Server 2022 environment that requires backing up to an SFTP server, which we&#8217;ve named <em>datacart<\/em>. Before we can establish the backup repository, it&#8217;s essential to generate an SSH key for authentication against our <em>datacart<\/em> server.<\/p>\n<p>Please, open PowerShell or Command Prompt on the Windows Server to follow the subsequent steps.<\/p>\n<ol>\n<li>\n<p><strong>Create a SSH key on the Windows Server<\/strong>:<\/p>\n<pre><code class=\"language-powershell\">PS &gt; ssh-keygen -t ed25519\n\nGenerating public\/private ed25519 key pair.\nEnter file in which to save the key (C:\\Users\\Administrator\/.ssh\/id_ed25519):\nCreated directory 'C:\\Users\\Administrator\/.ssh'.\nEnter passphrase (empty for no passphrase):\nEnter same passphrase again:\nYour identification has been saved in C:\\Users\\Administrator\/.ssh\/id_ed25519.\nYour public key has been saved in C:\\Users\\Administrator\/.ssh\/id_ed25519.pub.\nThe key fingerprint is:\nSHA256:LVSjzmZIHG5sHXKW3oF9Inyl2bLljntFSG6krOTMfGY administrator@restic\nThe key's randomart image is:\n+--[ED25519 256]--+\n|      o.++o..    |\n|     + *=+==+    |\n|      B.+=+Oo.   |\n|     + =o.+=+ .  |\n|      .*S.o...   |\n|       o*.Eo  .  |\n|         +. ..   |\n|           ..    |\n|          ..     |\n+----[SHA256]-----+<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>Transfer the public to the backup target<\/strong>:<\/p>\n<p>We already have a predefined user on datacart named <code>rbackup<\/code>.<\/p>\n<pre><code class=\"language-powershell\">PS &gt; cat .\\.ssh\\id_ed25519.pub |ssh rbackup@datacart \"cat - &gt;&gt; .ssh\/authorized_keys\"\nThe authenticity of host 'datacart (172.16.77.1)' can't be established.\nECDSA key fingerprint is SHA256:xFUeMRuhqAnT75s9UwX1VTwqvKusWcrc9eCZEOohMy0.\nAre you sure you want to continue connecting (yes\/no\/[fingerprint])? yes\nWarning: Permanently added 'datacart,172.16.77.1' (ECDSA) to the list of known hosts.\nrbackup@datacart's password:<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>Ensure the SFTP connection is working<\/strong><\/p>\n<p>It is working when you are not prompted for a password anymore.<\/p>\n<pre><code class=\"language-powershell\">PS &gt; sftp rbackup@datacart\nConnected to datacart.\nsftp&gt; quit<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>Generate a random string<\/strong><\/p>\n<p>Restic is well known for its encryption feature to keep to data secure even if it is hosted in an area not well known by you. Hence, we create a random string which is being used as the encryption password for you backuped data.<\/p>\n<pre><code class=\"language-powershell\">PS &gt; [System.Web.Security.Membership]::GeneratePassword(32, 2)\nyG8mm7yd:p(7Ef}?2zF#4u0N\/PXflz[G<\/code><\/pre>\n<p>Create the RESTIC_PASSWORD environment variable to carry the password. We use it only temporarily to create the repo. Later it is known only by the Ansible server.<\/p>\n<pre><code class=\"language-powershell\">PS &gt; $env:RESTIC_PASSWORD = \"yG8mm7yd:p(7Ef}?2zF#4u0N\/PXflz[G\"<\/code><\/pre>\n<li>\n<p><strong>Initialize the Repository<\/strong>:<\/p>\n<p>Let&#8217;s create the Restic repository.<\/p>\n<pre><code class=\"language-powershell\">PS &gt; restic -r sftp:rbackup@datacart:windows init\ncreated restic repository e6c986d035 at sftp:rbackup@datacart:windows\n\nPlease note that knowledge of your password is required to access\nthe repository. Losing your password means that your data is irrecoverably lost.<\/code><\/pre>\n<p>The command will the repo named <em>windows<\/em> on the host <em>datacart<\/em> via the SFTP user <em>rbackup<\/em>. It reads the password from the enviroment variable.<\/p>\n<\/li>\n<h2>Performing a Test Backup<\/h2>\n<p>Performing a test backup to your SFTP repository. Ensure <code>$RESTIC_PASSWORD<\/code> is set.<\/p>\n<pre><code class=\"language-powershell\">   PS &gt; restic -r sftp:rbackup@datacart:windows backup C:\\ --use-fs-snapshot\n   repository e6c986d0 opened (version 2, compression level auto)\n   no parent snapshot found, will read all files\n\n   creating VSS snapshot for [c:\\]\n   successfully created snapshot for [c:\\]\n\n   Files:       205650 new,     0 changed,     0 unmodified\n   Dirs:        59450 new,     0 changed,     0 unmodified\n   Added to the repository: 13.784 GiB (6.634 GiB stored)\n\n   processed 205650 files, 21.464 GiB in 16:51\n   snapshot a30e4628 saved<\/code><\/pre>\n<p>Due to the use of <code>--use-fs-snapshot<\/code> Restic will create a native Windows Volume Shadow Copy Service (VSS) snapshot.<\/p>\n<h2>Performing a Test Restore<\/h2>\n<p>To restore files from your backup:<\/p>\n<ol>\n<li>\n<p><strong>List Available Snapshots<\/strong>:<\/p>\n<p>Find the ID of the snapshot you want to restore:<\/p>\n<pre><code class=\"language-powershell\">\nPS &gt; restic -r sftp:rbackup@datacart:windows snapshots\nrepository e6c986d0 opened (version 2, compression level auto)\nID        Time                 Host        Tags        Paths\n------------------------------------------------------------\na30e4628  2024-02-22 14:55:39  restic                  C:\\\n------------------------------------------------------------<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>It did find a single snapshot which was created before.<\/p>\n<ol start=\"2\">\n<li>\n<p><strong>Restore Files<\/strong>:<\/p>\n<p>Use the snapshot ID to restore files:<\/p>\n<pre><code class=\"language-powershell\">PS &gt; restic -r sftp:rbackup@datacart:windows --target c:\\restore restore a30e4628:\/C\/Windows\/System32\/\nrepository e6c986d0 opened (version 2, compression level auto)\n[0:00] 100.00%  2 \/ 2 index files loaded\nrestoring <Snapshot a30e4628 of invalid_tags_codes_15| at 2024-02-22 14:55:39.8986101 +0100 CET by RESTIC\\Administrator@restic> to c:\\restore\nSummary: Restored 16883 files\/dirs (2.920 GiB) in 1:30<\/code><\/pre>\n<p>Due to the specification of a <code>--target c:\\restore<\/code> Restic proove by itself if the target directory does exist, if not it will be created. Several methods do exist to restore a single path. One is to give the path right behind the snapshot ID.<\/p>\n<p>You can also proof the content of the snapshot by using the <code>ls<\/code> option of Restic:<\/p>\n<pre><code class=\"language-powershell\">PS &gt; restic -r sftp:rbackup@datacart:windows ls a30e4628\nrepository e6c986d0 opened (version 2, compression level auto)\n[0:00] 100.00%  2 \/ 2 index files loaded\nsnapshot a30e4628 of [C:\\] filtered by [] at 2024-02-22 14:55:39.8986101 +0100 CET):\n\/C\n\/C\/$Recycle.Bin\n\/C\/$Recycle.Bin\/S-1-5-21-3884125958-3418005504-2446353653-1000\n\/C\/$Recycle.Bin\/S-1-5-21-3884125958-3418005504-2446353653-1000\/desktop.ini\n\/C\/$Recycle.Bin\/S-1-5-21-3884125958-3418005504-2446353653-500\n\/C\/$Recycle.Bin\/S-1-5-21-3884125958-3418005504-2446353653-500\/$IP018UJ\n\/C\/$Recycle.Bin\/S-1-5-21-3884125958-3418005504-2446353653-500\/$RP018UJ\n\/C\/$Recycle.Bin\/S-1-5-21-3884125958-3418005504-2446353653-500\/desktop.ini\n\/C\/$WinREAgent\n\/C\/$WinREAgent\/Scratch\n\/C\/Documents and Settings\n[...]<\/code><\/pre>\n<\/li>\n<\/ol>\n<h2>Bringing Ansible Into The Game<\/h2>\n<p>Leveraging Ansible in tandem with Restic on Windows provides an efficient and streamlined approach for managing backups across various systems. This integration allows users to benefit from centralized scheduling using tools such as <a href=\"https:\/\/github.com\/ansible\/awx\">Ansible AWX<\/a> or <a href=\"https:\/\/www.semui.co\/\">Semaphore<\/a>, facilitating the orchestration of backup operations from a single point of control. Additionally, the centralized management of Restic&#8217;s encryption keys enhances security, as the encryption keys are not stored on the target systems themselves. This architecture not only simplifies the backup process but also significantly strengthens data protection measures.<\/p>\n<h3>Introducing a Backup Script<\/h3>\n<p>We stripped down the backup script to show the procedure.<\/p>\n<pre><code class=\"language-powershell\">      $resticRepo = \"sftp:rbackup@datacart:windows\/\"\n      $resticPass = \"yG8mm7yd:p(7Ef}?2zF#4u0N\/PXflz[G\"\n      $backupPaths = @(\"C:\\\")\n\n      function BackupPath {\n          param (\n              [string]$pathToBackup\n          )\n          &amp; restic -r $resticRepo backup $pathToBackup --use-fs-snapshot *&gt;&amp;1\n      }\n\n      $env:RESTIC_PASSWORD = $resticPass\n\n      foreach ($path in $backupPaths) {\n          Write \"---\"\n          BackupPath -pathToBackup $path\n      }<\/code><\/pre>\n<p>As evident, the encryption password is embedded directly in the script, which is not our desired approach. While transferring the script to the server would allow it to execute, this method necessitates managing the password individually on each host, which is impractical.<\/p>\n<h3>Creating an Ansible Playbook<\/h3>\n<p>Ansible offers the flexibility to run the backup script with a distinct set of parameters on each target host. We will store the repository and backup paths in Ansible variables. Additionally, we plan to utilize an Ansible Vault to securely store the Restic encryption password.<\/p>\n<blockquote>\n<p>You can also replace the Ansible Vault with a key server (i. e. HashiCorp Vault) or any other technic to hold your secrets.<\/p>\n<\/blockquote>\n<p>The following is executed in your automation environment.<\/p>\n<ol>\n<li><strong>Creating the Ansible Vault<\/strong>:<\/li>\n<\/ol>\n<pre><code class=\"language-bash\">\u279c ansible-vault encrypt_string 'yG8mm7yd:p(7Ef}?2zF#4u0N\/PXflz[G' --name 'restic_pass' &gt; restic_pass.yaml\nNew Vault password: \nConfirm New Vault password: <\/code><\/pre>\n<p>You have to specificy a Vault password.<\/p>\n<ol start=\"2\">\n<li><strong>Creating the Final Playbook<\/strong><\/li>\n<\/ol>\n<pre><code class=\"language-bash\">---\n# Restic Showcase: Backup Windows Server 2022\n- name: Restic - Backup Windows Server 2022\n  hosts: restic-showcase\n  gather_facts: false\n  become: true\n  vars_files:\n    - restic_pass.yaml\n  vars:\n    restic_repo: \"sftp:rbackup@datacart:windows\/\"\n    backup_paths: ['C:',]\n\n  tasks:\n  - name: Execute Restic Backup Script\n    ansible.windows.win_shell: |\n      $resticRepo = \"{{ restic_repo }}\"\n      $resticPass = \"{{ restic_pass }}\"\n      $backupPaths = \"{{ backup_paths | join('\\\", \\\"') }}\"\n      $backupPaths = @($backupPaths -split ',')\n\n      function BackupPath {\n          param (\n              [string]$pathToBackup\n          )\n          &amp; restic -r $resticRepo backup $pathToBackup --use-fs-snapshot *&gt;&amp;1\n      }\n\n      $env:RESTIC_PASSWORD = $resticPass\n\n      foreach ($path in $backupPaths) {\n          Write \"---\"\n          Write \"Backing up $path...\"\n          BackupPath -pathToBackup $path\n          Write \"$path backup completed.\"\n      }\n    register: restic_result\n\n  - debug:\n      var: restic_result.stdout_lines<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>Executing the Playbook<\/strong><\/li>\n<\/ol>\n<p>You will be asked about the Vault password. Which can be automated as well which is not scope of this article.<\/p>\n<pre><code class=\"language-bash\">\u279c ansible-playbook -i hosts.ini win-backup.yaml --ask-vault-pass\nVault password: \n\nPLAY [Restic - Backup Windows Server 2022] ***************************************************************************************************************************\n\nTASK [Execute Restic Backup Script] **********************************************************************************************************************************\nchanged: [restic-host]\n\nTASK [debug] *********************************************************************************************************************************************************\nok: [restic-host] =&gt; {\n    \"restic_result.stdout_lines\": [\n        \"---\",\n        \"Backing up C:\\\\...\",\n        \"using parent snapshot f4264bc7\",\n        \"creating VSS snapshot for [c:\\\\]\",\n        \"successfully created snapshot for [c:\\\\]\",\n        \"\",\n        \"Files:           1 new,    31 changed, 221126 unmodified\",\n        \"Dirs:            0 new,    62 changed, 61484 unmodified\",\n        \"Added to the repository: 16.484 MiB (1.772 MiB stored)\",\n        \"\",\n        \"processed 221158 files, 24.368 GiB in 0:43\",\n        \"snapshot 217cbdf8 saved\",\n        \"C:\\\\ backup completed.\"\n    ]\n}\n\nPLAY RECAP ***********************************************************************************************************************************************************\nrestic-host                : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   <\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>In conclusion, Ansible and Restic complement each other exceptionally well, offering a robust and flexible solution for managing backups across diverse environments. Throughout this discussion, we&#8217;ve highlighted the essential steps to integrate these powerful tools, demonstrating their compatibility and ease of use together. While this article focused on direct interaction between Ansible and Restic, it&#8217;s worth noting that for those looking to further automate and scale their backup solutions, platforms such as Ansible AWX and Semaphore present valuable options. Although exploring these automation platforms falls beyond the scope of this article, they underscore the potential for extending the capabilities of Ansible and Restic, reinforcing the seamless synergy between them for comprehensive backup management.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Even in a Windows environment, leveraging Free Software is possible and beneficial. Discover how combining Restic and Ansible can revolutionize your Windows server backups.<\/p>\n","protected":false},"author":1,"featured_media":566,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-378","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backup-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Backup Strategy through the Power of Ansible and Restic - Codesch\u00f6pfer GmbH<\/title>\n<meta name=\"description\" content=\"Even in a Windows environment, leveraging Free Software is possible and beneficial. Discover how combining Restic and Ansible can revolutionize your Windows server backups.\" \/>\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.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Backup Strategy through the Power of Ansible and Restic - Codesch\u00f6pfer GmbH\" \/>\n<meta property=\"og:description\" content=\"Even in a Windows environment, leveraging Free Software is possible and beneficial. Discover how combining Restic and Ansible can revolutionize your Windows server backups.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/\" \/>\n<meta property=\"og:site_name\" content=\"Codesch\u00f6pfer GmbH\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-30T09:47:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-08T10:41:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/restic-blog-960_480.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"SWigand\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codeschoepfer\" \/>\n<meta name=\"twitter:site\" content=\"@codeschoepfer\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"SWigand\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/\"},\"author\":{\"name\":\"SWigand\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#\\\/schema\\\/person\\\/02681979bb8b0335811903f12812deda\"},\"headline\":\"A Backup Strategy through the Power of Ansible and Restic\",\"datePublished\":\"2024-04-30T09:47:47+00:00\",\"dateModified\":\"2024-06-08T10:41:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/\"},\"wordCount\":1347,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codeschoepfer.de\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/restic-blog-960_480.jpg\",\"articleSection\":[\"Backup\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/\",\"url\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/\",\"name\":\"A Backup Strategy through the Power of Ansible and Restic - Codesch\u00f6pfer GmbH\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codeschoepfer.de\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/restic-blog-960_480.jpg\",\"datePublished\":\"2024-04-30T09:47:47+00:00\",\"dateModified\":\"2024-06-08T10:41:50+00:00\",\"description\":\"Even in a Windows environment, leveraging Free Software is possible and beneficial. Discover how combining Restic and Ansible can revolutionize your Windows server backups.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codeschoepfer.de\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/restic-blog-960_480.jpg\",\"contentUrl\":\"https:\\\/\\\/www.codeschoepfer.de\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/restic-blog-960_480.jpg\",\"width\":960,\"height\":480,\"caption\":\"Free Software\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/a-backup-strategy-through-the-power-of-ansible-and-restic\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Backup Strategy through the Power of Ansible and Restic\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/\",\"name\":\"Codesch\u00f6pfer GmbH\",\"description\":\"Codesch\u00f6pfer GmbH\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#organization\",\"name\":\"Codesch\u00f6pfer GmbH\",\"url\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codeschoepfer.de\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/logo_cs_vlinks_rgb.png\",\"contentUrl\":\"https:\\\/\\\/www.codeschoepfer.de\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/logo_cs_vlinks_rgb.png\",\"width\":723,\"height\":202,\"caption\":\"Codesch\u00f6pfer GmbH\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/codeschoepfer\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codeschoepfer\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/#\\\/schema\\\/person\\\/02681979bb8b0335811903f12812deda\",\"name\":\"SWigand\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0776bc73f0cf88d13c2bcf9ae4d44c263da721e7df582404bb666a5a12a0504b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0776bc73f0cf88d13c2bcf9ae4d44c263da721e7df582404bb666a5a12a0504b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0776bc73f0cf88d13c2bcf9ae4d44c263da721e7df582404bb666a5a12a0504b?s=96&d=mm&r=g\",\"caption\":\"SWigand\"},\"sameAs\":[\"https:\\\/\\\/www.codeschoepfer.de\"],\"url\":\"https:\\\/\\\/www.codeschoepfer.de\\\/en\\\/author\\\/swigand\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Backup Strategy through the Power of Ansible and Restic - Codesch\u00f6pfer GmbH","description":"Even in a Windows environment, leveraging Free Software is possible and beneficial. Discover how combining Restic and Ansible can revolutionize your Windows server backups.","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.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/","og_locale":"en_US","og_type":"article","og_title":"A Backup Strategy through the Power of Ansible and Restic - Codesch\u00f6pfer GmbH","og_description":"Even in a Windows environment, leveraging Free Software is possible and beneficial. Discover how combining Restic and Ansible can revolutionize your Windows server backups.","og_url":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/","og_site_name":"Codesch\u00f6pfer GmbH","article_published_time":"2024-04-30T09:47:47+00:00","article_modified_time":"2024-06-08T10:41:50+00:00","og_image":[{"width":960,"height":480,"url":"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/restic-blog-960_480.jpg","type":"image\/jpeg"}],"author":"SWigand","twitter_card":"summary_large_image","twitter_creator":"@codeschoepfer","twitter_site":"@codeschoepfer","twitter_misc":{"Written by":"SWigand","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/#article","isPartOf":{"@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/"},"author":{"name":"SWigand","@id":"https:\/\/www.codeschoepfer.de\/en\/#\/schema\/person\/02681979bb8b0335811903f12812deda"},"headline":"A Backup Strategy through the Power of Ansible and Restic","datePublished":"2024-04-30T09:47:47+00:00","dateModified":"2024-06-08T10:41:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/"},"wordCount":1347,"publisher":{"@id":"https:\/\/www.codeschoepfer.de\/en\/#organization"},"image":{"@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/restic-blog-960_480.jpg","articleSection":["Backup"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/","url":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/","name":"A Backup Strategy through the Power of Ansible and Restic - Codesch\u00f6pfer GmbH","isPartOf":{"@id":"https:\/\/www.codeschoepfer.de\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/#primaryimage"},"image":{"@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/restic-blog-960_480.jpg","datePublished":"2024-04-30T09:47:47+00:00","dateModified":"2024-06-08T10:41:50+00:00","description":"Even in a Windows environment, leveraging Free Software is possible and beneficial. Discover how combining Restic and Ansible can revolutionize your Windows server backups.","breadcrumb":{"@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/#primaryimage","url":"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/restic-blog-960_480.jpg","contentUrl":"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/restic-blog-960_480.jpg","width":960,"height":480,"caption":"Free Software"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codeschoepfer.de\/en\/a-backup-strategy-through-the-power-of-ansible-and-restic\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/www.codeschoepfer.de\/en\/"},{"@type":"ListItem","position":2,"name":"A Backup Strategy through the Power of Ansible and Restic"}]},{"@type":"WebSite","@id":"https:\/\/www.codeschoepfer.de\/en\/#website","url":"https:\/\/www.codeschoepfer.de\/en\/","name":"Codesch\u00f6pfer GmbH","description":"Codesch\u00f6pfer GmbH","publisher":{"@id":"https:\/\/www.codeschoepfer.de\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codeschoepfer.de\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codeschoepfer.de\/en\/#organization","name":"Codesch\u00f6pfer GmbH","url":"https:\/\/www.codeschoepfer.de\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codeschoepfer.de\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/logo_cs_vlinks_rgb.png","contentUrl":"https:\/\/www.codeschoepfer.de\/wp-content\/uploads\/2024\/04\/logo_cs_vlinks_rgb.png","width":723,"height":202,"caption":"Codesch\u00f6pfer GmbH"},"image":{"@id":"https:\/\/www.codeschoepfer.de\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/codeschoepfer","https:\/\/www.linkedin.com\/company\/codeschoepfer\/"]},{"@type":"Person","@id":"https:\/\/www.codeschoepfer.de\/en\/#\/schema\/person\/02681979bb8b0335811903f12812deda","name":"SWigand","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0776bc73f0cf88d13c2bcf9ae4d44c263da721e7df582404bb666a5a12a0504b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0776bc73f0cf88d13c2bcf9ae4d44c263da721e7df582404bb666a5a12a0504b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0776bc73f0cf88d13c2bcf9ae4d44c263da721e7df582404bb666a5a12a0504b?s=96&d=mm&r=g","caption":"SWigand"},"sameAs":["https:\/\/www.codeschoepfer.de"],"url":"https:\/\/www.codeschoepfer.de\/en\/author\/swigand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/posts\/378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/comments?post=378"}],"version-history":[{"count":8,"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/posts\/378\/revisions"}],"predecessor-version":[{"id":628,"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/posts\/378\/revisions\/628"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/media\/566"}],"wp:attachment":[{"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/media?parent=378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/categories?post=378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codeschoepfer.de\/en\/wp-json\/wp\/v2\/tags?post=378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}