Multiple source directories in duply

5,030

Solution 1

Make the source your system root SOURCE="/" and then create an exclude file at:

~/conf/<backupprofile>/exclude

At this article there is a good example of exclude file: http://aguslr.github.com/blog/2012/04/18/backups-with-duply/

**/*[Cc]ache*
**/*[Hh]istory*
**/*[Ss]ocket*
**/*[Tt]humb*
**/*[Tt]rash*
**/*[Bb]ackup
**/*.[Bb]ak
**/*[Dd]ump
**/*.[Ll]ock
**/*.log
**/*.part
**/*.[Tt]mp
**/*.[Tt]emp
**/*.swp
**/*~
**/.adobe
**/.cache
**/.dbus
**/.fonts
**/.gnupg/random_seed
**/.gvfs
**/.kvm
**/.local/share/icons
**/.macromedia
**/.obex
**/.rpmdb
**/.thumbnails
**/.VirtualBox
**/.wine
**/Downloads

Also, you should not backup /dev, /proc and other system folders in a Unix system. Just add them to the exclude file.

If you mean multiple remote directories, you must create a profile for each machine:

duply server1 backup
duply server2 backup

Solution 2

actually the above does merely achieve a backup everything while excluding some files/folders. the correct answer would be.

use the highest common root folder that contains all folder you want to back up. using SOURCE="/" is the easy way to achieve that.

now modify your .duply/<profile>/exclude as follows

+ /folder1
+ /folder2
- **

Note: there is a space between the plus/minus symbol and the path entry

this is because duply uses the globbing exclude list duplicity feature, where an exclude list merely treats each entry with a default '-' if not defined otherwise. see section 'File Selection' in the duplicity man page

http://duplicity.nongnu.org/duplicity.1.html#sect10

Share:
5,030

Related videos on Youtube

student
Author by

student

Updated on September 18, 2022

Comments

  • student
    student almost 2 years

    Is it possible to specify multiple source directories in a duply configuration file? If not is there any simple workaround?

  • student
    student over 11 years
    Why not an include filelist?
  • n3storm
    n3storm over 11 years
    Yes, that too. In my experience, for a full system backup is easier to create an exclude file. Maybe for a personal home backup you can pick each interesting directory "by hand" (What happens if you create a new directory and miss to add it to the list?). But when dealing with other users and services data you need to backup all except unusable stuff like devs and procs.