[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] Backing up a jail



On Aug 18, 2013, at 6:32 PM, Dan Langille wrote:

> 
> On Aug 8, 2013, at 5:22 PM, Panagiotis Christias wrote:
> 
>> On 9/8/2013 00:17, Ollivier Robert wrote:
>>> According to Dan Langille:
>>>> Given a jail at /usr/jails/example.org, I plan to exclude the
>>>> following directories:
>>> 
>>> These are symlinks, just use a backup system that does not reference
>>> symlinks, just store them (which almost system I know --
>>> tar/cpio/pax/zfs send/dump -- will do by default).
>>> 
>>> The main things is that of course, unless you have specified every
>>> jail inside their own FS (easy with ZFS, slightly less practical with
>>> UFS), dump/restore won't be usable as it does dump only entire FS
>>> (something Rémy Card submitted a patch for years ago...)
>> 
>> When backing up jails, I really like "rsync -x" and "gtar --one-file-system" since all basejail stuff is nullfs mounted.
> 
> 
> It turns out that my backup solution (Bacula) does that by default.  I don't have to worry about any nullfs mounted at all.


Here is the Bacula fileset I'm using now:

FileSet {
  Name = "ezjail jail"
  Include {
    Options {
      signature=MD5
    } 
    File = /
    Exclude Dir Containing = .NOBACKUP
  }
  Exclude {
    File = /bin
    File = /boot
    File = /lib
    File = /libexec
    File = /rescue
    File = /sbin
    File = /sys   
    File = /usr/bin
    File = /usr/include
    File = /usr/lib
    File = /usr/libdata
    File = /usr/libexec
    File = /usr/ports
    File = /usr/sbin
    File = /usr/share
    File = /usr/src
    File = /var/ports

    # mounts 
    File = /dev
    File = /proc
    File = /basejail
  }  
}
   
Hope that helps.

-- 
Dan Langille - http://langille.org