This commit is contained in:
wesbarnett 2021-03-14 14:02:05 +00:00
parent 8a07717b39
commit eb4a9d9ca3
12 changed files with 107 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View file

@ -42,8 +42,60 @@ Each section can have the following entries:
* ``userdata`` - list of strings; key-value pairs that will be added to the userdata for
the pair of snapshots. Default: []
Examples
--------
Turn off snapshots for ``root`` configuration and turn on for ``home`` configuration:
.. code-block:: ini
[root]
snapshot = False
[home]
snapshot = True
Set the snapper to add the userdata ``important=yes`` for every snapshot in the ``root``
configuration when a system upgrade is performed:
.. code-block:: ini
[root]
important_commands = ["pacman -Syu"]
Set the snapper to add the userdata ``important=yes`` for every snapshot in the ``root``
configuration when a pacman transaction handles the packages ``linux`` and ``linux-lts``:
.. code-block:: ini
[root]
important_packages = ["linux", "linux-lts"]
Here's a fuller example, with several options set for different configurations. In this
case the ``root`` configuration snapshot will have ``important=yes`` when ``linux`` and
``linux-lts`` packages are part of the transaction. Additionally when full system
upgrades are performed ``root`` snapshots will be marked ``important=yes``. Note that
you don't have to add ``snapshot = True`` for the ``root`` configuration since that is
the default.
This file also turns one snapshots for the ``home`` snapper configuration and adds the
userdata ``requestid=42,user=arthur`` to all snapshots for that configuration.
Additionally he post snapshot description is overridden.
.. code-block:: ini
[root]
important_packages = ["linux", "linux-lts"]
important_commands = ["pacman -Syu"]
[home]
snapshot = True
userdata = ["requestid=42", "user=arthur"]
post_description = "pacman transaction post snapshot"
Environment Variables
---------------------
=====================
To temporarily prevent snapshots from being performed for a single pacman
command, set the environment variable ``SNAP_PAC_SKIP``. For example:

View file

@ -49,6 +49,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
@ -125,14 +126,56 @@ separated list of packages that were installed, upgraded, or removed.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">userdata</span></code> - list of strings; key-value pairs that will be added to the userdata for
the pair of snapshots. Default: []</p></li>
</ul>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<p>Turn off snapshots for <code class="docutils literal notranslate"><span class="pre">root</span></code> configuration and turn on for <code class="docutils literal notranslate"><span class="pre">home</span></code> configuration:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[root]</span>
<span class="na">snapshot</span> <span class="o">=</span> <span class="s">False</span>
<span class="k">[home]</span>
<span class="na">snapshot</span> <span class="o">=</span> <span class="s">True</span>
</pre></div>
</div>
<p>Set the snapper to add the userdata <code class="docutils literal notranslate"><span class="pre">important=yes</span></code> for every snapshot in the <code class="docutils literal notranslate"><span class="pre">root</span></code>
configuration when a system upgrade is performed:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[root]</span>
<span class="na">important_commands</span> <span class="o">=</span> <span class="s">[&quot;pacman -Syu&quot;]</span>
</pre></div>
</div>
<p>Set the snapper to add the userdata <code class="docutils literal notranslate"><span class="pre">important=yes</span></code> for every snapshot in the <code class="docutils literal notranslate"><span class="pre">root</span></code>
configuration when a pacman transaction handles the packages <code class="docutils literal notranslate"><span class="pre">linux</span></code> and <code class="docutils literal notranslate"><span class="pre">linux-lts</span></code>:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[root]</span>
<span class="na">important_packages</span> <span class="o">=</span> <span class="s">[&quot;linux&quot;, &quot;linux-lts&quot;]</span>
</pre></div>
</div>
<p>Heres a fuller example, with several options set for different configurations. In this
case the <code class="docutils literal notranslate"><span class="pre">root</span></code> configuration snapshot will have <code class="docutils literal notranslate"><span class="pre">important=yes</span></code> when <code class="docutils literal notranslate"><span class="pre">linux</span></code> and
<code class="docutils literal notranslate"><span class="pre">linux-lts</span></code> packages are part of the transaction. Additionally when full system
upgrades are performed <code class="docutils literal notranslate"><span class="pre">root</span></code> snapshots will be marked <code class="docutils literal notranslate"><span class="pre">important=yes</span></code>. Note that
you dont have to add <code class="docutils literal notranslate"><span class="pre">snapshot</span> <span class="pre">=</span> <span class="pre">True</span></code> for the <code class="docutils literal notranslate"><span class="pre">root</span></code> configuration since that is
the default.</p>
<p>This file also turns one snapshots for the <code class="docutils literal notranslate"><span class="pre">home</span></code> snapper configuration and adds the
userdata <code class="docutils literal notranslate"><span class="pre">requestid=42,user=arthur</span></code> to all snapshots for that configuration.
Additionally he post snapshot description is overridden.</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[root]</span>
<span class="na">important_packages</span> <span class="o">=</span> <span class="s">[&quot;linux&quot;, &quot;linux-lts&quot;]</span>
<span class="na">important_commands</span> <span class="o">=</span> <span class="s">[&quot;pacman -Syu&quot;]</span>
<span class="k">[home]</span>
<span class="na">snapshot</span> <span class="o">=</span> <span class="s">True</span>
<span class="na">userdata</span> <span class="o">=</span> <span class="s">[&quot;requestid=42&quot;, &quot;user=arthur&quot;]</span>
<span class="na">post_description</span> <span class="o">=</span> <span class="s">&quot;pacman transaction post snapshot&quot;</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="environment-variables">
<h2>Environment Variables<a class="headerlink" href="#environment-variables" title="Permalink to this headline"></a></h2>
<h1>Environment Variables<a class="headerlink" href="#environment-variables" title="Permalink to this headline"></a></h1>
<p>To temporarily prevent snapshots from being performed for a single pacman
command, set the environment variable <code class="docutils literal notranslate"><span class="pre">SNAP_PAC_SKIP</span></code>. For example:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo <span class="nv">SNAP_PAC_SKIP</span><span class="o">=</span>y pacman -Syu
</pre></div>
</div>
</div>
</div>

View file

@ -49,6 +49,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>

View file

@ -48,6 +48,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">FAQ</a></li>

View file

@ -47,6 +47,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>

View file

@ -48,6 +48,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
@ -113,6 +114,7 @@ use it. The exact procedure depends on your specific setup. Be careful.</p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>

View file

@ -49,6 +49,7 @@
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>

View file

@ -53,6 +53,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>

View file

@ -1 +1 @@
Search.setIndex({docnames:["configuration","examples","faq","index","installation","troubleshooting"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["configuration.rst","examples.rst","faq.rst","index.rst","installation.rst","troubleshooting.rst"],objects:{},objnames:{},objtypes:{},terms:{"100":1,"1033":1,"1034":1,"2016":1,"8535cef3f3c38ee69555bf67e4b5e45aa3b8c5c3":4,"boolean":0,"default":[0,3,5],"final":4,"import":0,"true":0,"while":5,For:[0,4],That:5,The:[0,1,3,5],Then:[0,1,4],Use:2,abov:1,action:2,add:[0,2,5],added:0,addit:0,addition:[0,3],after:[1,3,5],alia:3,all:[0,1,4],along:1,also:1,altern:4,ani:[0,3,5],appli:0,apr:1,aur:3,automat:[2,3],avail:1,avzq:2,awk:2,back:[2,3],backup:2,bash:2,becaus:3,befor:[0,1,3],behavior:[2,5],being:[0,5],bin:[1,2],boot:2,bootbackup:2,breakag:3,btrf:2,call:[0,3],can:[0,1,2,3,5],care:3,caus:3,cdt:1,chang:[1,3],check:1,chroot:3,command:[0,3],comment:0,commit:4,configur:[1,3,5],conflict:1,consid:5,continu:1,copi:0,correspond:0,creat:[1,3],databas:5,delet:[1,2],depend:[1,3],desc_limit:0,descript:[0,2,3],detail:3,diff:[1,5],directli:3,disk:1,doc:1,doe:[2,3],doesn:3,done:0,download:4,dure:[1,3],each:[0,1,3],easili:3,edit:0,editor:0,end:2,entri:0,environ:3,error:1,etc:[0,1,5],exact:3,exampl:[0,3],exec:2,expect:5,explanatori:0,extrem:3,f7b28c61944fe30dabeeb0b01070bcc98c18bd66:4,fals:0,faq:[1,3],favorit:0,featur:3,file:[0,1,5],filter:5,find:[2,3],fingerprint:4,follow:[0,1,2,5],found:1,fri:1,from:[0,3,5],get:3,give:5,given:1,gone:3,gpg:4,has:[3,5],have:[0,3,4],helper:3,here:1,hook:[0,1,2,3,5],how:[1,2,3],html:1,important_command:0,important_packag:0,inform:5,ini:0,instal:[0,1,2,3],instruct:5,integ:0,integr:1,involv:0,its:5,kei:[0,1,4],kernel:2,keyr:1,later:0,latest:4,length:0,lib:2,like:[2,3],link:2,linux:2,list:[0,1,2],live:3,load:1,locat:0,lock:5,log:[1,3],longer:[1,2],look:1,mai:[0,3],make:[3,4],matter:3,maximum:0,mean:1,method:3,mib:1,modifi:1,modul:2,more:[3,5],most:[0,3],mount:3,name:0,nano:1,nanorc:1,need:[0,3],non:2,now:1,number:[1,3,4],old:2,onli:[0,5],opensus:3,oper:2,option:0,other:[0,5],otherwis:0,output:[1,3],overridden:0,pac:[0,1,2,4,5],packag:[0,1,2,3,4],pacman:[0,1,2,3,4,5],pair:0,parent:0,part:2,partit:2,perform:[0,1,5],pgp:4,post:[0,1,3,5],post_descript:0,posttransact:2,pre:[0,1,3,5],pre_descript:0,pretransact:2,prevent:0,previou:4,print:2,proce:1,procedur:3,process:1,properli:3,provid:3,pytest:4,python:[0,4],reason:3,releas:4,remov:[0,2,3,5],requir:4,resolv:1,resort:3,restor:5,revert:3,rnano:1,rollback:[1,3],root:[0,1,2,5],rsync:2,run:[1,4,5],same:1,screen:3,script:3,section:[0,5],see:[1,3,5],self:0,separ:0,set:[0,3,5],setup:3,sever:3,share:1,she:3,should:0,sig:4,sign:4,signatur:4,similar:3,simpl:3,singl:0,size:1,snap:[0,1,2,4,5],snap_pac_skip:0,snaphot:5,snapper:[0,1,2,3,4,5],snapshot:[0,1,2,3,5],some:3,someth:2,space:[0,1],specif:3,start:4,statu:[1,5],string:0,subvolum:3,sudo:0,suitabl:0,symbol:1,symlink:2,system:3,syu:0,tail:1,take:[3,5],taken:5,tar:4,tarbal:4,target:2,temporarili:0,thi:[1,2,3,5],thing:3,through:3,total:1,transact:[0,1,3],trigger:2,troubleshoot:3,truncat:[0,1],type:2,unam:2,undo:[1,3],undochang:[1,3,5],unless:0,upgrad:[0,2,3],usb:3,use:3,used:[1,3],user:[0,3],userdata:0,using:[3,4],usr:[1,2],valu:0,verifi:4,version:4,via:0,wai:[1,3],want:3,well:3,were:0,what:1,when:[2,3,5],where:4,whether:[0,3],which:[3,5],won:5,would:2,xtype:2,yast:3,yes:[0,5],you:[0,1,2,3,4,5],your:[0,3]},titles:["Configuration","Example","FAQ","snap-pac","Installation","Troubleshooting"],titleterms:{configur:0,depend:4,environ:0,exampl:1,faq:2,instal:4,pac:3,snap:3,test:4,troubleshoot:5,variabl:0}})
Search.setIndex({docnames:["configuration","examples","faq","index","installation","troubleshooting"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["configuration.rst","examples.rst","faq.rst","index.rst","installation.rst","troubleshooting.rst"],objects:{},objnames:{},objtypes:{},terms:{"100":1,"1033":1,"1034":1,"2016":1,"8535cef3f3c38ee69555bf67e4b5e45aa3b8c5c3":4,"boolean":0,"case":0,"default":[0,3,5],"final":4,"import":0,"true":0,"while":5,For:[0,4],That:5,The:[0,1,3,5],Then:[0,1,4],Use:2,abov:1,action:2,add:[0,2,5],added:0,addit:0,addition:[0,3],after:[1,3,5],alia:3,all:[0,1,4],along:1,also:[0,1],altern:4,ani:[0,3,5],appli:0,apr:1,arthur:0,aur:3,automat:[2,3],avail:1,avzq:2,awk:2,back:[2,3],backup:2,bash:2,becaus:3,befor:[0,1,3],behavior:[2,5],being:[0,5],bin:[1,2],boot:2,bootbackup:2,breakag:3,btrf:2,call:[0,3],can:[0,1,2,3,5],care:3,caus:3,cdt:1,chang:[1,3],check:1,chroot:3,command:[0,3],comment:0,commit:4,configur:[1,3,5],conflict:1,consid:5,continu:1,copi:0,correspond:0,creat:[1,3],databas:5,delet:[1,2],depend:[1,3],desc_limit:0,descript:[0,2,3],detail:3,diff:[1,5],differ:0,directli:3,disk:1,doc:1,doe:[2,3],doesn:3,don:0,done:0,download:4,dure:[1,3],each:[0,1,3],easili:3,edit:0,editor:0,end:2,entri:0,environ:3,error:1,etc:[0,1,5],everi:0,exact:3,exampl:3,exec:2,expect:5,explanatori:0,extrem:3,f7b28c61944fe30dabeeb0b01070bcc98c18bd66:4,fals:0,faq:[1,3],favorit:0,featur:3,file:[0,1,5],filter:5,find:[2,3],fingerprint:4,follow:[0,1,2,5],found:1,fri:1,from:[0,3,5],full:0,fuller:0,get:3,give:5,given:1,gone:3,gpg:4,handl:0,has:[3,5],have:[0,3,4],helper:3,here:[0,1],home:0,hook:[0,1,2,3,5],how:[1,2,3],html:1,important_command:0,important_packag:0,inform:5,ini:0,instal:[0,1,2,3],instruct:5,integ:0,integr:1,involv:0,its:5,kei:[0,1,4],kernel:2,keyr:1,later:0,latest:4,length:0,lib:2,like:[2,3],link:2,linux:[0,2],list:[0,1,2],live:3,load:1,locat:0,lock:5,log:[1,3],longer:[1,2],look:1,lts:0,mai:[0,3],make:[3,4],mark:0,matter:3,maximum:0,mean:1,method:3,mib:1,modifi:1,modul:2,more:[3,5],most:[0,3],mount:3,name:0,nano:1,nanorc:1,need:[0,3],non:2,note:0,now:1,number:[1,3,4],off:0,old:2,one:0,onli:[0,5],opensus:3,oper:2,option:0,other:[0,5],otherwis:0,output:[1,3],overridden:0,pac:[0,1,2,4,5],packag:[0,1,2,3,4],pacman:[0,1,2,3,4,5],pair:0,parent:0,part:[0,2],partit:2,perform:[0,1,5],pgp:4,post:[0,1,3,5],post_descript:0,posttransact:2,pre:[0,1,3,5],pre_descript:0,pretransact:2,prevent:0,previou:4,print:2,proce:1,procedur:3,process:1,properli:3,provid:3,pytest:4,python:[0,4],reason:3,releas:4,remov:[0,2,3,5],requestid:0,requir:4,resolv:1,resort:3,restor:5,revert:3,rnano:1,rollback:[1,3],root:[0,1,2,5],rsync:2,run:[1,4,5],same:1,screen:3,script:3,section:[0,5],see:[1,3,5],self:0,separ:0,set:[0,3,5],setup:3,sever:[0,3],share:1,she:3,should:0,sig:4,sign:4,signatur:4,similar:3,simpl:3,sinc:0,singl:0,size:1,snap:[0,1,2,4,5],snap_pac_skip:0,snaphot:5,snapper:[0,1,2,3,4,5],snapshot:[0,1,2,3,5],some:3,someth:2,space:[0,1],specif:3,start:4,statu:[1,5],string:0,subvolum:3,sudo:0,suitabl:0,symbol:1,symlink:2,system:[0,3],syu:0,tail:1,take:[3,5],taken:5,tar:4,tarbal:4,target:2,temporarili:0,thi:[0,1,2,3,5],thing:3,through:3,total:1,transact:[0,1,3],trigger:2,troubleshoot:3,truncat:[0,1],turn:0,type:2,unam:2,undo:[1,3],undochang:[1,3,5],unless:0,upgrad:[0,2,3],usb:3,use:3,used:[1,3],user:[0,3],userdata:0,using:[3,4],usr:[1,2],valu:0,variabl:3,verifi:4,version:4,via:0,wai:[1,3],want:3,well:3,were:0,what:1,when:[0,2,3,5],where:4,whether:[0,3],which:[3,5],won:5,would:2,xtype:2,yast:3,yes:[0,5],you:[0,1,2,3,4,5],your:[0,3]},titles:["Configuration","Example","FAQ","snap-pac","Installation","Troubleshooting"],titleterms:{configur:0,depend:4,environ:0,exampl:[0,1],faq:2,instal:4,pac:3,snap:3,test:4,troubleshoot:5,variabl:0}})

View file

@ -49,6 +49,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html#environment-variables">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples.html">Example</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>