mirror of
https://github.com/ovh/the-bastion.git
synced 2025-09-07 21:44:28 +08:00
Merge pull request #57 from ovh/backupfix
osh-backup-acl-keys and osh-encrypt-rsync fixes
This commit is contained in:
commit
461b1304c7
2 changed files with 3 additions and 3 deletions
|
|
@ -59,7 +59,7 @@ _log "Starting backup..."
|
|||
tarfile="$DESTDIR/backup-$(date +'%Y-%m-%d').tar.gz"
|
||||
_log "Creating $tarfile..."
|
||||
supp_entries=""
|
||||
for entry in /root/.gnupg /var/otp
|
||||
for entry in /root/.gnupg /root/.ssh /var/otp
|
||||
do
|
||||
[ -e "$entry" ] && supp_entries="$supp_entries $entry"
|
||||
done
|
||||
|
|
@ -71,7 +71,7 @@ tar czf "$tarfile" -p --xattrs --acls --one-file-system --numeric-owner \
|
|||
--exclude="*.sqlite" \
|
||||
--exclude="*.log" \
|
||||
--exclude="*.ttyrec" \
|
||||
--exclude="*.gpg" \
|
||||
--exclude="*.ttyrec.*" \
|
||||
--exclude="*.gz" \
|
||||
--exclude="*.zst" \
|
||||
/home/ /etc/passwd /etc/group /etc/shadow /etc/gshadow /etc/bastion /etc/ssh $supp_entries 2>/dev/null; ret=$?
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ sub potentially_work_on_this_file {
|
|||
|
||||
# file must be a ttyrec file or an osh_http_proxy_ttyrec-ish file
|
||||
my $filetype;
|
||||
$filetype = 'ttyrec' if m{^/home/[^/]+/ttyrec/[^/]+/[A-Za-z0-9._-]+(\.ttyrec(\.zst)?)?$};
|
||||
$filetype = 'ttyrec' if m{^/home/[^/]+/ttyrec/[^/]+/[^/]+(\.ttyrec(\.zst)?)?$};
|
||||
$filetype = 'proxylog' if m{^/home/[^/]+/ttyrec/[^/]+/\d+-\d+-\d+\.txt$};
|
||||
$filetype or return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue