Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Dec 2012 00:18:47 +0400
From:      =?koi8-r?Q?=F4=C1=D2=C1=D3_=F3=C1=D7=DE=D5=CB?= <taras@1adm.ru>
To:        "freebsd-jail@freebsd.org" <freebsd-jail@freebsd.org>
Subject:   Exclude dirs from archive
Message-ID:  <6ADDA2AC9C82F04AAFF4CD5C6884888F011F1E789430@SRV.o.1adm.ru>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hi,

Little change to make our life better, i.e. ability to exclude some big or unnecessary dirs from archive:

ezjail-admin archive ... -e "/var/tmp /tmp /usr/ports"

I'm not sure if it is correct, but works for me.

--
Savchuk Taras 


[-- Attachment #2 --]
53c53
< ezjail_usage_archive="Usage: ${ezjail_admin} archive [-Af] [-a archive] [-d archivedir] jailname [jailname...]"
---
> ezjail_usage_archive="Usage: ${ezjail_admin} archive [-Af] [-a archive] [-d archivedir] [-e dirs to exclude from archive] jailname [jailname...]"
1130c1130
<   shift; while getopts :Afa:d: arg; do case ${arg} in
---
>   shift; while getopts :Afa:d:e: arg; do case ${arg} in
1134a1135
>     e) ezjail_excludedirs=${OPTARG};;
1155a1157,1165
>   # Make arg to exclude dirs from archive
>   tmp_excludedirs=""
>   if [ "$ezjail_excludedirs" ]; then
>     for substr in $ezjail_excludedirs; do
> 	tmp_excludedirs="$tmp_excludedirs -s:^.$substr.*::g"
>     done
>   fi
>   ezjail_excludedirs=$tmp_excludedirs
> 
1215a1226
>       $ezjail_excludedirs \
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6ADDA2AC9C82F04AAFF4CD5C6884888F011F1E789430>