Add note for includes/excludes brace expansion
This commit is contained in:
parent
d4ad3b735f
commit
3268ff0858
|
@ -44,6 +44,8 @@ sync_tasks_wrapper() {
|
||||||
|
|
||||||
case "${SYSTEM}" in
|
case "${SYSTEM}" in
|
||||||
linux)
|
linux)
|
||||||
|
# NOTE: remember to single-quote paths if they contain globs (*)
|
||||||
|
# and you want to defer expansion
|
||||||
declare -a rsync_default_includes=(
|
declare -a rsync_default_includes=(
|
||||||
/bin
|
/bin
|
||||||
/boot
|
/boot
|
||||||
|
@ -54,6 +56,8 @@ sync_tasks_wrapper() {
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
*bsd)
|
*bsd)
|
||||||
|
# NOTE: remember to single-quote paths if they contain globs (*)
|
||||||
|
# and you want to defer expansion
|
||||||
declare -a rsync_default_includes=(
|
declare -a rsync_default_includes=(
|
||||||
/bin
|
/bin
|
||||||
/bsd
|
/bsd
|
||||||
|
@ -71,6 +75,8 @@ sync_tasks_wrapper() {
|
||||||
fi
|
fi
|
||||||
readonly rsync_default_includes
|
readonly rsync_default_includes
|
||||||
|
|
||||||
|
# NOTE: remember to single-quote paths if they contain globs (*)
|
||||||
|
# and you want to defer expansion
|
||||||
declare -a rsync_default_excludes=(
|
declare -a rsync_default_excludes=(
|
||||||
/dev
|
/dev
|
||||||
/proc
|
/proc
|
||||||
|
@ -83,15 +89,15 @@ sync_tasks_wrapper() {
|
||||||
/usr/src
|
/usr/src
|
||||||
/var/apt
|
/var/apt
|
||||||
/var/cache
|
/var/cache
|
||||||
/var/db/munin/*.tmp
|
'/var/db/munin/*.tmp'
|
||||||
/var/lib/amavis/amavisd.sock
|
/var/lib/amavis/amavisd.sock
|
||||||
/var/lib/amavis/tmp
|
/var/lib/amavis/tmp
|
||||||
/var/lib/amavis/virusmails
|
/var/lib/amavis/virusmails
|
||||||
/var/lib/clamav/*.tmp
|
'/var/lib/clamav/*.tmp'
|
||||||
/var/lib/elasticsearch
|
/var/lib/elasticsearch
|
||||||
/var/lib/metche
|
/var/lib/metche
|
||||||
/var/lib/mongodb
|
/var/lib/mongodb
|
||||||
/var/lib/munin/*tmp*
|
'/var/lib/munin/*tmp*'
|
||||||
/var/lib/mysql
|
/var/lib/mysql
|
||||||
/var/lib/php/sessions
|
/var/lib/php/sessions
|
||||||
/var/lib/php5
|
/var/lib/php5
|
||||||
|
@ -106,20 +112,20 @@ sync_tasks_wrapper() {
|
||||||
/var/state
|
/var/state
|
||||||
/var/tmp
|
/var/tmp
|
||||||
lost+found
|
lost+found
|
||||||
.nfs.*
|
'.nfs.*'
|
||||||
lxc/*/rootfs/tmp
|
'lxc/*/rootfs/tmp'
|
||||||
lxc/*/rootfs/usr/doc
|
'lxc/*/rootfs/usr/doc'
|
||||||
lxc/*/rootfs/usr/obj
|
'lxc/*/rootfs/usr/obj'
|
||||||
lxc/*/rootfs/usr/share/doc
|
'lxc/*/rootfs/usr/share/doc'
|
||||||
lxc/*/rootfs/usr/src
|
'lxc/*/rootfs/usr/src'
|
||||||
lxc/*/rootfs/var/apt
|
'lxc/*/rootfs/var/apt'
|
||||||
lxc/*/rootfs/var/cache
|
'lxc/*/rootfs/var/cache'
|
||||||
lxc/*/rootfs/var/lib/php5
|
'lxc/*/rootfs/var/lib/php5'
|
||||||
lxc/*/rootfs/var/lib/php/sessions
|
'lxc/*/rootfs/var/lib/php/sessions'
|
||||||
lxc/*/rootfs/var/lock
|
'lxc/*/rootfs/var/lock'
|
||||||
lxc/*/rootfs/var/run
|
'lxc/*/rootfs/var/run'
|
||||||
lxc/*/rootfs/var/state
|
'lxc/*/rootfs/var/state'
|
||||||
lxc/*/rootfs/var/tmp
|
'lxc/*/rootfs/var/tmp'
|
||||||
/home/mysqltmp
|
/home/mysqltmp
|
||||||
)
|
)
|
||||||
readonly rsync_default_excludes
|
readonly rsync_default_excludes
|
||||||
|
@ -443,4 +449,4 @@ main() {
|
||||||
send_mail
|
send_mail
|
||||||
|
|
||||||
exit ${GLOBAL_RC}
|
exit ${GLOBAL_RC}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,8 @@ sync_tasks() {
|
||||||
|
|
||||||
# What to include in your sync task
|
# What to include in your sync task
|
||||||
# Add or remove paths if you need
|
# Add or remove paths if you need
|
||||||
|
# NOTE: remember to single-quote paths if they contain globs (*)
|
||||||
|
# and you want to defer expansion
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
RSYNC_INCLUDES=(
|
RSYNC_INCLUDES=(
|
||||||
"${rsync_default_includes[@]}"
|
"${rsync_default_includes[@]}"
|
||||||
|
@ -106,6 +108,8 @@ sync_tasks() {
|
||||||
|
|
||||||
# What to exclude from your sync task
|
# What to exclude from your sync task
|
||||||
# Add or remove paths if you need
|
# Add or remove paths if you need
|
||||||
|
# NOTE: remember to single-quote paths if they contain globs (*)
|
||||||
|
# and you want to defer expansion
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
RSYNC_EXCLUDES=(
|
RSYNC_EXCLUDES=(
|
||||||
"${rsync_default_excludes[@]}"
|
"${rsync_default_excludes[@]}"
|
||||||
|
@ -273,4 +277,4 @@ source "${LIBDIR}/main.sh"
|
||||||
|
|
||||||
########## Let's go! ##################################################
|
########## Let's go! ##################################################
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in a new issue