backup and stuff

This commit is contained in:
bee
2026-06-12 15:14:27 +02:00
parent c0ae209a9d
commit fa1231d1f8
4 changed files with 59 additions and 2 deletions
+22 -1
View File
@@ -7,6 +7,10 @@ now=$(date +"%Y%m%d%H%M")
declare -a arr=("mail" "matrix" "monitoring")
declare -a monitoring=("monitoring_prometheus-data" "monitoring_grafana-storage" "monitoring_loki-data" "monitoring_alloy-data")
declare -a matrix=("matrix_db")
declare -a immich=("systemd-immich-pgdata" "systemd-immich-upload")
gitea_uid=$(id -u gitea)
immich_uid=$(id -u immich)
restore() {
for i in "${arr[@]}"; do
@@ -21,6 +25,10 @@ restore() {
for j in "${matrix[@]}"; do
rm -rf /opt/beeserver/matrix/${j}.tar
done
systemctl --user --machine gitea@.host start gitea-db.service gitea-server.service || true
systemctl --user --machine immich@.host start immich-db.service immich-redis.service immich-server.service || true
rm -f /home/immich/systemd-immich-*.tar
}
trap restore EXIT
@@ -48,4 +56,17 @@ do
podman-compose up -d
done
tar -czf - /opt/backup/beeserver | gpg --batch --passphrase-file /opt/backup/passphrase.txt -c -o /home/beeshare/raid/serverBackup/beeserver_daily_${now}.tar.gz.gpg
systemctl --user --machine gitea@.host stop gitea-server.service gitea-db.service
rsync -aH /home/gitea/data /opt/backup/beeserver/gitea
systemctl --user --machine gitea@.host start gitea-db.service gitea-server.service
systemctl --user --machine immich@.host stop immich-server.service immich-db.service immich-redis.service
for v in "${immich[@]}"
do
sudo -u immich XDG_RUNTIME_DIR=/run/user/${immich_uid} podman volume export ${v} --output /home/immich/${v}.tar
done
systemctl --user --machine immich@.host start immich-db.service immich-redis.service immich-server.service
mkdir -p /opt/backup/beeserver/immich/
mv /home/immich/systemd-immich-*.tar /opt/backup/beeserver/immich/
tar -czf - /opt/backup/beeserver | gpg --batch --passphrase-file /opt/backup/passphrase.txt -c -o /home/beeshare/raid/serverBackup/beeserver_daily_${now}.tar.gz.gpg
+9 -1
View File
@@ -1,5 +1,10 @@
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
map $http_user_agent $link_preview_bot {
default 0;
"~*(Discordbot|Twitterbot|facebookexternalhit|Facebot|Slackbot|TelegramBot|WhatsApp|LinkedInBot|Pinterest|redditbot|Iframely|vkShare|SkypeUriPreview|Mastodon|Googlebot|bingbot)" 1;
}
server {
listen 80 default_server;
server_name secretbee.buzz;
@@ -50,7 +55,10 @@ server {
try_files $uri $uri.html $uri/index.html index.html;
}
location /siri {
location = /siri {
if ($link_preview_bot) {
rewrite ^ /siri.html last;
}
return 301 https://gallery.secretbee.buzz/s/siri;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

+28
View File
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
<title>Siri References</title>
<meta charset="utf-8">
<meta name="theme-color" content="#f54927">
<!-- Facebook -->
<meta property="og:type" content="website">
<meta property="og:title" content="Siri References">
<meta property="og:description" content="All the official Siri references.">
<meta property="og:site_name" content="secretbee.buzz">
<meta property="og:url" content="https://secretbee.buzz/siri">
<meta property="og:image" content="https://secretbee.buzz/siri-cover.png">
<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="secretbee.buzz">
<meta property="twitter:url" content="https://secretbee.buzz/siri">
<meta name="twitter:title" content="Siri References">
<meta name="twitter:description" content="All the official Siri references.">
<meta name="twitter:image" content="https://secretbee.buzz/siri-cover.png">
<link rel="canonical" href="https://secretbee.buzz/siri">
</head>
<body>
<p><a href="https://gallery.secretbee.buzz/s/siri">View the gallery →</a></p>
</body>
</html>