Add filtering
This commit is contained in:
23
backup.sh
23
backup.sh
@@ -36,13 +36,32 @@ tmpgpg() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tmpgpg --import "${dir}/pubkey.asc"
|
tmpgpg --import "${dir}/pubkey.asc"
|
||||||
tar \
|
find \
|
||||||
|
"${backup_source}" \
|
||||||
|
\( \
|
||||||
|
-regex "${backup_source}.*nextcloud/.*/files_trashbin" \
|
||||||
|
-o \
|
||||||
|
-regex "${backup_source}.*nextcloud/nextcloud.log" \
|
||||||
|
-o \
|
||||||
|
-regex "${backup_source}.*registry/docker/registry/" \
|
||||||
|
-o \
|
||||||
|
-regex "${backup_source}.*gogs/.*/gogs.log.*" \
|
||||||
|
-o \
|
||||||
|
-regex "${backup_source}.*gogs/gogs/data/sessions/.*" \
|
||||||
|
\) \
|
||||||
|
-prune \
|
||||||
|
-o \
|
||||||
|
-print0 \
|
||||||
|
| tar \
|
||||||
--create \
|
--create \
|
||||||
--verbose \
|
--verbose \
|
||||||
--gzip \
|
--gzip \
|
||||||
--one-file-system \
|
--one-file-system \
|
||||||
|
--null \
|
||||||
|
--no-recursion \
|
||||||
|
--verbatim-files-from \
|
||||||
|
--files-from - \
|
||||||
--file - \
|
--file - \
|
||||||
"${backup_source}" \
|
|
||||||
| tmpgpg \
|
| tmpgpg \
|
||||||
--output - \
|
--output - \
|
||||||
--encrypt \
|
--encrypt \
|
||||||
|
|||||||
Reference in New Issue
Block a user