<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Restic on SourFox</title>
    <link>https://sourfox.khmersite.net/tags/restic/</link>
    <description>Recent content in Restic on SourFox</description>
    <image>
      <title>SourFox</title>
      <url>https://sourfox.khmersite.net/papermod-cover.png</url>
      <link>https://sourfox.khmersite.net/papermod-cover.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 30 Dec 2024 16:51:56 +1100</lastBuildDate>
    <atom:link href="https://sourfox.khmersite.net/tags/restic/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Create Restic Backup Program</title>
      <link>https://sourfox.khmersite.net/p/2024/12/create-restic-backup-program/</link>
      <pubDate>Mon, 30 Dec 2024 16:51:56 +1100</pubDate>
      <guid>https://sourfox.khmersite.net/p/2024/12/create-restic-backup-program/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m sharing a wrapper program written in python to backup my files in my device using restic.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;import subprocess

restic_command = [&amp;#39;restic&amp;#39;, &amp;#39;backup&amp;#39;]

backup = [&amp;#34;C:\\Users\\veronica\\ibisPaint&amp;#34;, &amp;#34;C:\\Users\\veronica\\Pictures&amp;#34;, &amp;#34;C:\\Users\\veronica\\Documents&amp;#34;]

print(&amp;#34;List of directories to be backed up:\n&amp;#34; )

#list the files that will be backed up.
#enumerate = allows you to keep track of the number of iterations in a loop.
for number, dir in enumerate(backup, start=1):
    print(f&amp;#34;    {number}. {dir}&amp;#34;)
#  Or: print(&amp;#34;    &amp;#34; + str(number) + &amp;#34;.&amp;#34;, letter )

# \n makes a new line
print(&amp;#34;\nBackup process started...\n&amp;#34;)

# combines the lists together.
backup_command = restic_command + backup

restic = subprocess.run(backup_command, shell=True)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The end. -w-&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
