Merge pull request #57 from ovh/backupfix

osh-backup-acl-keys and osh-encrypt-rsync fixes
This commit is contained in:
Stéphane Lesimple 2020-11-19 18:07:56 +01:00 committed by GitHub
commit 461b1304c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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=$?

View file

@ -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;