Can I ignore files by pattern in deja-dup (Backup)?












7














My Déjà Dup backups have become quiet large and I noticed they contain a huge number of unnecessary files (e.g. *.pyc files, **__pycache__ folders and other build related temporary stuff).



I know that I can ignore specific folders, but is there a way to exclude files and or folders by patterns?



I thought there might be more options usable trough a configuration file, but Déjà Dup doesn't use one. So I looked at duplicity (the CLI it is based on), but the man page doesn't mention a configuration file either. I know that duplicity can ignore files and folders based on patterns (--exclude, --exclude-filelist), but I have no idea how to combine this with Déjà Dup.



Do I have to ditch Déjà Dup and use duplicity manually? Or is there a way to set the needed options, so that they are used automatically, when duplicity is used by Déjà Dup?










share|improve this question





























    7














    My Déjà Dup backups have become quiet large and I noticed they contain a huge number of unnecessary files (e.g. *.pyc files, **__pycache__ folders and other build related temporary stuff).



    I know that I can ignore specific folders, but is there a way to exclude files and or folders by patterns?



    I thought there might be more options usable trough a configuration file, but Déjà Dup doesn't use one. So I looked at duplicity (the CLI it is based on), but the man page doesn't mention a configuration file either. I know that duplicity can ignore files and folders based on patterns (--exclude, --exclude-filelist), but I have no idea how to combine this with Déjà Dup.



    Do I have to ditch Déjà Dup and use duplicity manually? Or is there a way to set the needed options, so that they are used automatically, when duplicity is used by Déjà Dup?










    share|improve this question



























      7












      7








      7


      2





      My Déjà Dup backups have become quiet large and I noticed they contain a huge number of unnecessary files (e.g. *.pyc files, **__pycache__ folders and other build related temporary stuff).



      I know that I can ignore specific folders, but is there a way to exclude files and or folders by patterns?



      I thought there might be more options usable trough a configuration file, but Déjà Dup doesn't use one. So I looked at duplicity (the CLI it is based on), but the man page doesn't mention a configuration file either. I know that duplicity can ignore files and folders based on patterns (--exclude, --exclude-filelist), but I have no idea how to combine this with Déjà Dup.



      Do I have to ditch Déjà Dup and use duplicity manually? Or is there a way to set the needed options, so that they are used automatically, when duplicity is used by Déjà Dup?










      share|improve this question















      My Déjà Dup backups have become quiet large and I noticed they contain a huge number of unnecessary files (e.g. *.pyc files, **__pycache__ folders and other build related temporary stuff).



      I know that I can ignore specific folders, but is there a way to exclude files and or folders by patterns?



      I thought there might be more options usable trough a configuration file, but Déjà Dup doesn't use one. So I looked at duplicity (the CLI it is based on), but the man page doesn't mention a configuration file either. I know that duplicity can ignore files and folders based on patterns (--exclude, --exclude-filelist), but I have no idea how to combine this with Déjà Dup.



      Do I have to ditch Déjà Dup and use duplicity manually? Or is there a way to set the needed options, so that they are used automatically, when duplicity is used by Déjà Dup?







      backup deja-dup duplicity






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 28 '15 at 10:24

























      asked Oct 28 '15 at 10:07









      Brutus

      363517




      363517






















          5 Answers
          5






          active

          oldest

          votes


















          3














          You can edit the exclude list like:



          gsettings get org.gnome.DejaDup exclude-list
          # remove comment to execute
          # gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']


          Source: https://answers.launchpad.net/deja-dup/+question/280954



          I tried to add patterns like '**/.git' and '**/build' into that list, like this:



          gsettings get org.gnome.DejaDup exclude-list > exclude-list
          gedit exclude-list
          gsettings set org.gnome.DejaDup exclude-list "`cat exclude-list`"


          But to me it seems like the **'s were not passed to duplicity.
          So instead I ended up doing seaches like



          locate "/home/*/.svn"
          locate "/home/*/build"


          and added them to the exclude-list manually






          share|improve this answer































            2














            There is no way currently with Deja Dup to do advanced filtering like that. See upstream bug https://bugs.launchpad.net/deja-dup/+bug/374274






            share|improve this answer





























              2














              I tried Jacob Nordfalk's method, but it did not work for me (maybe the syntax changed).



              However, I was able to change the setting using dconf-editor. You can modify the list at path /org/gnome/deja-dup/exclude-list






              share|improve this answer





























                0














                Sadly neither Duplicity nor Déjà Dup uses a configuration file :( But there might be a possible workaround, the user @mterry mentioned the following in the bug report linked above:




                if you gconf-edit the exclude-list and add patterns like "**/parts", the pattern is passed to duplicity and everything works as expected..."




                Now, where are those gconf settings stored these days?






                share|improve this answer

















                • 1




                  org -> gnome -> deja-dup a.k.a. org.gnome.DejaDup. Not working for me, though.
                  – esmail
                  Nov 9 '15 at 21:21










                • you can edit the exclude list like: gsettings get org.gnome.DejaDup exclude-list gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']
                  – Jacob Nordfalk
                  Feb 23 '17 at 13:26



















                0














                I successfully achieve exclusion using my include_list.txt file containing:



                - /home/justin/**/.insync-trash
                - /home/justin/**/__pycache__
                - /home/justin/**/*.pyc
                - /home/justin/**/node_modules
                - /home/justin/**/Google Photos
                + /home/justin/Documents
                - /home/justin/*


                The /**/ is important to match through to any directory depth.



                Rule 1: The order is important. First be specific first and general later.



                Rule 2: What has already been matched in a line (include or exclude) cannot be changed by subsequent matches in later lines. The documentation mentions this; but in terribly confusing English. Hope mine is better ;) The lines above achieve:




                • Line 1: exclude any __pycache__ at any depth.

                • Line 2: exlude any file with extension .pyc.

                • Line 6: include my specific and only Documents folder.

                • Line 7: exclude all my other home folder such as Pictures, Videos, Downloads, etc. Note that this cannot stop Documents from being included as it was already matched in Line 6! Order matters!






                share|improve this answer





















                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "89"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f690990%2fcan-i-ignore-files-by-pattern-in-deja-dup-backup%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  5 Answers
                  5






                  active

                  oldest

                  votes








                  5 Answers
                  5






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  3














                  You can edit the exclude list like:



                  gsettings get org.gnome.DejaDup exclude-list
                  # remove comment to execute
                  # gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']


                  Source: https://answers.launchpad.net/deja-dup/+question/280954



                  I tried to add patterns like '**/.git' and '**/build' into that list, like this:



                  gsettings get org.gnome.DejaDup exclude-list > exclude-list
                  gedit exclude-list
                  gsettings set org.gnome.DejaDup exclude-list "`cat exclude-list`"


                  But to me it seems like the **'s were not passed to duplicity.
                  So instead I ended up doing seaches like



                  locate "/home/*/.svn"
                  locate "/home/*/build"


                  and added them to the exclude-list manually






                  share|improve this answer




























                    3














                    You can edit the exclude list like:



                    gsettings get org.gnome.DejaDup exclude-list
                    # remove comment to execute
                    # gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']


                    Source: https://answers.launchpad.net/deja-dup/+question/280954



                    I tried to add patterns like '**/.git' and '**/build' into that list, like this:



                    gsettings get org.gnome.DejaDup exclude-list > exclude-list
                    gedit exclude-list
                    gsettings set org.gnome.DejaDup exclude-list "`cat exclude-list`"


                    But to me it seems like the **'s were not passed to duplicity.
                    So instead I ended up doing seaches like



                    locate "/home/*/.svn"
                    locate "/home/*/build"


                    and added them to the exclude-list manually






                    share|improve this answer


























                      3












                      3








                      3






                      You can edit the exclude list like:



                      gsettings get org.gnome.DejaDup exclude-list
                      # remove comment to execute
                      # gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']


                      Source: https://answers.launchpad.net/deja-dup/+question/280954



                      I tried to add patterns like '**/.git' and '**/build' into that list, like this:



                      gsettings get org.gnome.DejaDup exclude-list > exclude-list
                      gedit exclude-list
                      gsettings set org.gnome.DejaDup exclude-list "`cat exclude-list`"


                      But to me it seems like the **'s were not passed to duplicity.
                      So instead I ended up doing seaches like



                      locate "/home/*/.svn"
                      locate "/home/*/build"


                      and added them to the exclude-list manually






                      share|improve this answer














                      You can edit the exclude list like:



                      gsettings get org.gnome.DejaDup exclude-list
                      # remove comment to execute
                      # gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']


                      Source: https://answers.launchpad.net/deja-dup/+question/280954



                      I tried to add patterns like '**/.git' and '**/build' into that list, like this:



                      gsettings get org.gnome.DejaDup exclude-list > exclude-list
                      gedit exclude-list
                      gsettings set org.gnome.DejaDup exclude-list "`cat exclude-list`"


                      But to me it seems like the **'s were not passed to duplicity.
                      So instead I ended up doing seaches like



                      locate "/home/*/.svn"
                      locate "/home/*/build"


                      and added them to the exclude-list manually







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Feb 24 '17 at 8:50

























                      answered Feb 23 '17 at 13:33









                      Jacob Nordfalk

                      1765




                      1765

























                          2














                          There is no way currently with Deja Dup to do advanced filtering like that. See upstream bug https://bugs.launchpad.net/deja-dup/+bug/374274






                          share|improve this answer


























                            2














                            There is no way currently with Deja Dup to do advanced filtering like that. See upstream bug https://bugs.launchpad.net/deja-dup/+bug/374274






                            share|improve this answer
























                              2












                              2








                              2






                              There is no way currently with Deja Dup to do advanced filtering like that. See upstream bug https://bugs.launchpad.net/deja-dup/+bug/374274






                              share|improve this answer












                              There is no way currently with Deja Dup to do advanced filtering like that. See upstream bug https://bugs.launchpad.net/deja-dup/+bug/374274







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Oct 28 '15 at 13:00









                              Michael Terry

                              3,3401431




                              3,3401431























                                  2














                                  I tried Jacob Nordfalk's method, but it did not work for me (maybe the syntax changed).



                                  However, I was able to change the setting using dconf-editor. You can modify the list at path /org/gnome/deja-dup/exclude-list






                                  share|improve this answer


























                                    2














                                    I tried Jacob Nordfalk's method, but it did not work for me (maybe the syntax changed).



                                    However, I was able to change the setting using dconf-editor. You can modify the list at path /org/gnome/deja-dup/exclude-list






                                    share|improve this answer
























                                      2












                                      2








                                      2






                                      I tried Jacob Nordfalk's method, but it did not work for me (maybe the syntax changed).



                                      However, I was able to change the setting using dconf-editor. You can modify the list at path /org/gnome/deja-dup/exclude-list






                                      share|improve this answer












                                      I tried Jacob Nordfalk's method, but it did not work for me (maybe the syntax changed).



                                      However, I was able to change the setting using dconf-editor. You can modify the list at path /org/gnome/deja-dup/exclude-list







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Nov 8 at 11:57









                                      josh21

                                      3817




                                      3817























                                          0














                                          Sadly neither Duplicity nor Déjà Dup uses a configuration file :( But there might be a possible workaround, the user @mterry mentioned the following in the bug report linked above:




                                          if you gconf-edit the exclude-list and add patterns like "**/parts", the pattern is passed to duplicity and everything works as expected..."




                                          Now, where are those gconf settings stored these days?






                                          share|improve this answer

















                                          • 1




                                            org -> gnome -> deja-dup a.k.a. org.gnome.DejaDup. Not working for me, though.
                                            – esmail
                                            Nov 9 '15 at 21:21










                                          • you can edit the exclude list like: gsettings get org.gnome.DejaDup exclude-list gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']
                                            – Jacob Nordfalk
                                            Feb 23 '17 at 13:26
















                                          0














                                          Sadly neither Duplicity nor Déjà Dup uses a configuration file :( But there might be a possible workaround, the user @mterry mentioned the following in the bug report linked above:




                                          if you gconf-edit the exclude-list and add patterns like "**/parts", the pattern is passed to duplicity and everything works as expected..."




                                          Now, where are those gconf settings stored these days?






                                          share|improve this answer

















                                          • 1




                                            org -> gnome -> deja-dup a.k.a. org.gnome.DejaDup. Not working for me, though.
                                            – esmail
                                            Nov 9 '15 at 21:21










                                          • you can edit the exclude list like: gsettings get org.gnome.DejaDup exclude-list gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']
                                            – Jacob Nordfalk
                                            Feb 23 '17 at 13:26














                                          0












                                          0








                                          0






                                          Sadly neither Duplicity nor Déjà Dup uses a configuration file :( But there might be a possible workaround, the user @mterry mentioned the following in the bug report linked above:




                                          if you gconf-edit the exclude-list and add patterns like "**/parts", the pattern is passed to duplicity and everything works as expected..."




                                          Now, where are those gconf settings stored these days?






                                          share|improve this answer












                                          Sadly neither Duplicity nor Déjà Dup uses a configuration file :( But there might be a possible workaround, the user @mterry mentioned the following in the bug report linked above:




                                          if you gconf-edit the exclude-list and add patterns like "**/parts", the pattern is passed to duplicity and everything works as expected..."




                                          Now, where are those gconf settings stored these days?







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Nov 2 '15 at 8:44









                                          Brutus

                                          363517




                                          363517








                                          • 1




                                            org -> gnome -> deja-dup a.k.a. org.gnome.DejaDup. Not working for me, though.
                                            – esmail
                                            Nov 9 '15 at 21:21










                                          • you can edit the exclude list like: gsettings get org.gnome.DejaDup exclude-list gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']
                                            – Jacob Nordfalk
                                            Feb 23 '17 at 13:26














                                          • 1




                                            org -> gnome -> deja-dup a.k.a. org.gnome.DejaDup. Not working for me, though.
                                            – esmail
                                            Nov 9 '15 at 21:21










                                          • you can edit the exclude list like: gsettings get org.gnome.DejaDup exclude-list gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']
                                            – Jacob Nordfalk
                                            Feb 23 '17 at 13:26








                                          1




                                          1




                                          org -> gnome -> deja-dup a.k.a. org.gnome.DejaDup. Not working for me, though.
                                          – esmail
                                          Nov 9 '15 at 21:21




                                          org -> gnome -> deja-dup a.k.a. org.gnome.DejaDup. Not working for me, though.
                                          – esmail
                                          Nov 9 '15 at 21:21












                                          you can edit the exclude list like: gsettings get org.gnome.DejaDup exclude-list gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']
                                          – Jacob Nordfalk
                                          Feb 23 '17 at 13:26




                                          you can edit the exclude list like: gsettings get org.gnome.DejaDup exclude-list gsettings set org.gnome.DejaDup exclude-list ['path1', 'path2']
                                          – Jacob Nordfalk
                                          Feb 23 '17 at 13:26











                                          0














                                          I successfully achieve exclusion using my include_list.txt file containing:



                                          - /home/justin/**/.insync-trash
                                          - /home/justin/**/__pycache__
                                          - /home/justin/**/*.pyc
                                          - /home/justin/**/node_modules
                                          - /home/justin/**/Google Photos
                                          + /home/justin/Documents
                                          - /home/justin/*


                                          The /**/ is important to match through to any directory depth.



                                          Rule 1: The order is important. First be specific first and general later.



                                          Rule 2: What has already been matched in a line (include or exclude) cannot be changed by subsequent matches in later lines. The documentation mentions this; but in terribly confusing English. Hope mine is better ;) The lines above achieve:




                                          • Line 1: exclude any __pycache__ at any depth.

                                          • Line 2: exlude any file with extension .pyc.

                                          • Line 6: include my specific and only Documents folder.

                                          • Line 7: exclude all my other home folder such as Pictures, Videos, Downloads, etc. Note that this cannot stop Documents from being included as it was already matched in Line 6! Order matters!






                                          share|improve this answer


























                                            0














                                            I successfully achieve exclusion using my include_list.txt file containing:



                                            - /home/justin/**/.insync-trash
                                            - /home/justin/**/__pycache__
                                            - /home/justin/**/*.pyc
                                            - /home/justin/**/node_modules
                                            - /home/justin/**/Google Photos
                                            + /home/justin/Documents
                                            - /home/justin/*


                                            The /**/ is important to match through to any directory depth.



                                            Rule 1: The order is important. First be specific first and general later.



                                            Rule 2: What has already been matched in a line (include or exclude) cannot be changed by subsequent matches in later lines. The documentation mentions this; but in terribly confusing English. Hope mine is better ;) The lines above achieve:




                                            • Line 1: exclude any __pycache__ at any depth.

                                            • Line 2: exlude any file with extension .pyc.

                                            • Line 6: include my specific and only Documents folder.

                                            • Line 7: exclude all my other home folder such as Pictures, Videos, Downloads, etc. Note that this cannot stop Documents from being included as it was already matched in Line 6! Order matters!






                                            share|improve this answer
























                                              0












                                              0








                                              0






                                              I successfully achieve exclusion using my include_list.txt file containing:



                                              - /home/justin/**/.insync-trash
                                              - /home/justin/**/__pycache__
                                              - /home/justin/**/*.pyc
                                              - /home/justin/**/node_modules
                                              - /home/justin/**/Google Photos
                                              + /home/justin/Documents
                                              - /home/justin/*


                                              The /**/ is important to match through to any directory depth.



                                              Rule 1: The order is important. First be specific first and general later.



                                              Rule 2: What has already been matched in a line (include or exclude) cannot be changed by subsequent matches in later lines. The documentation mentions this; but in terribly confusing English. Hope mine is better ;) The lines above achieve:




                                              • Line 1: exclude any __pycache__ at any depth.

                                              • Line 2: exlude any file with extension .pyc.

                                              • Line 6: include my specific and only Documents folder.

                                              • Line 7: exclude all my other home folder such as Pictures, Videos, Downloads, etc. Note that this cannot stop Documents from being included as it was already matched in Line 6! Order matters!






                                              share|improve this answer












                                              I successfully achieve exclusion using my include_list.txt file containing:



                                              - /home/justin/**/.insync-trash
                                              - /home/justin/**/__pycache__
                                              - /home/justin/**/*.pyc
                                              - /home/justin/**/node_modules
                                              - /home/justin/**/Google Photos
                                              + /home/justin/Documents
                                              - /home/justin/*


                                              The /**/ is important to match through to any directory depth.



                                              Rule 1: The order is important. First be specific first and general later.



                                              Rule 2: What has already been matched in a line (include or exclude) cannot be changed by subsequent matches in later lines. The documentation mentions this; but in terribly confusing English. Hope mine is better ;) The lines above achieve:




                                              • Line 1: exclude any __pycache__ at any depth.

                                              • Line 2: exlude any file with extension .pyc.

                                              • Line 6: include my specific and only Documents folder.

                                              • Line 7: exclude all my other home folder such as Pictures, Videos, Downloads, etc. Note that this cannot stop Documents from being included as it was already matched in Line 6! Order matters!







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Dec 20 at 7:31









                                              Justin Solms

                                              33128




                                              33128






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Ask Ubuntu!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.





                                                  Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                  Please pay close attention to the following guidance:


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f690990%2fcan-i-ignore-files-by-pattern-in-deja-dup-backup%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  數位音樂下載

                                                  When can things happen in Etherscan, such as the picture below?

                                                  格利澤436b