Compare commits

...
15 Commits
Author SHA1 Message Date
trnq1ll0 44674bdc38 migrate all backups scripts into new Repo called "Brücke" 2026-11-02 01:21:35 +01:00
Claude 46e13a4dd5 Offsite backup: write one JSON line per run to ~/Library/Logs
Each run (also failed or aborted ones, via the EXIT trap) appends start,
end, exit code, "complete" and the result per share to
bfds-offsite-backup.jsonl so a dashboard can show the last complete run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 01:08:07 +01:00
trnq1ll0 f035a3dc0c einschlafen des Macbooks verhindern 2026-10-24 22:41:15 +02:00
trnq1ll0 3e1c561559 add probing before copy 2026-10-23 12:43:31 +02:00
trnq1ll0 6fe87107ce port OFFSITE backup to MacOS script with spotlight launcher 2026-10-21 09:31:21 +02:00
trnq1ll0 9f0eafee19 windows cmd für OFFSITE backup fehlte der photos Ordner 2026-10-21 09:11:42 +02:00
trnq1ll0 f36e243da7 add: backup Paperless NGX to MacOS 2026-08-21 06:51:31 +02:00
trnq1ll0 b9a32c92d3 gitignore .DS_Store 2026-07-29 08:32:32 +02:00
trnq1ll0 adfc0a558c add: nextcloud files scan 2026-05-31 14:02:00 +02:00
trnq1ll0 4bfb3c34cf rename script 2026-05-31 14:01:43 +02:00
trnq1ll0 e718edb3f6 add cleanup script for uberspace/boogie 2026-05-09 11:26:35 +02:00
trnq1ll0 8ed8b69c7e rsync via ssh and set permissions via ssh afterwards 2026-01-27 13:21:51 +01:00
trnq1ll0 eeac807158 overhaul toast and log messages 2026-01-27 10:49:37 +01:00
trnq1ll0 61a92128a6 cap log file size 2026-01-27 10:13:18 +01:00
trnq1ll0 a21993489f timestamps in log file 2026-01-27 10:11:13 +01:00
32 changed files with 83 additions and 613 deletions

No files matched your search

Vendored
BIN
View File
Binary file not shown.
+1
View File
@@ -4,3 +4,4 @@ redshift_on
.DS_Store .DS_Store
node_modules/ node_modules/
.env .env
.DS_Store
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
# Dieses Skript löscht alte Nextcloud Installer Backups und verwaiste Dateien.
# Script Version 1.0
user_dir="/home/boogie"
nextcloud_backup_dir="$user_dir/nextcloud_data/updater-ockwywbvotb7/backups"
nexcloud_program_dir="/var/www/virtual/boogie/cloud.boogiedev.net"
if [ ! -d "$nextcloud_backup_dir" ]; then
echo "Verzeichnis nicht gefunden: $nextcloud_backup_dir"
exit 1
fi
echo "Dateien in $nextcloud_backup_dir:"
echo "-----------------------------------"
ls -lh "$nextcloud_backup_dir"
echo "-----------------------------------"
read -r -p "Alle Dateien wirklich löschen? (j/N): " bestaetigung
if [[ "$bestaetigung" =~ ^[jJ]$ ]]; then
rm -rf "$nextcloud_backup_dir"/*
echo "Alle Dateien wurden gelöscht."
else
echo "Abgebrochen. Keine Dateien gelöscht."
fi
echo "Verwaiste Dateien in $nexcloud_program_dir löschen"
echo "-----------------------------------"
read -r -p "Alle verwaisten Dateien löschen (occ files:cleanup)? (j/N): " bestaetigung
if [[ "$bestaetigung" =~ ^[jJ]$ ]]; then
cd "$nexcloud_program_dir" || exit
php occ files:cleanup
echo "Verwaiste Dateien wurden gelöscht."
else
echo "Abgebrochen. Keine verwaisten Dateien gelöscht."
fi
+43
View File
@@ -0,0 +1,43 @@
#!/bin/bash
# Dieses Skript aktualisiert die Nextcloud-Datenbank
# Script Version 1.0
nexcloud_program_dir="/var/www/virtual/boogie/cloud.boogiedev.net"
if [ ! -d "$nexcloud_program_dir" ]; then
echo "Verzeichnis nicht gefunden: $nexcloud_program_dir"
exit 1
fi
cd "$nexcloud_program_dir" || exit
echo "Nextcloud Datei-Scan"
echo "-----------------------------------"
echo "1) Alle Benutzer scannen"
echo "2) Einen bestimmten Benutzer scannen"
echo "-----------------------------------"
read -r -p "Auswahl (1/2): " auswahl
case "$auswahl" in
1)
echo "Scanne alle Benutzer..."
php occ files:scan --all
echo "Scan abgeschlossen."
;;
2)
read -r -p "Benutzername eingeben: " username
if [ -z "$username" ]; then
echo "Kein Benutzername eingegeben. Abgebrochen."
exit 1
fi
echo "Scanne Dateien für Benutzer: $username"
php occ files:scan "$username"
echo "Scan für $username abgeschlossen."
;;
*)
echo "Ungültige Auswahl. Abgebrochen."
exit 1
;;
esac
-34
View File
@@ -1,34 +0,0 @@
#!/bin/sh
# this one makes a copy of the whole /var/www/html from boogie to BFDS
SCRIPTPATH=$(dirname `realpath $0`)
cd $SCRIPTPATH
# rsync source -> destination
SOURCE_PATH=/var/www/virtual/boogie/html
DEST_PATH_FILES=/mnt/bfds/rob/backup/server/boogiedev.net/var_www
# path of the database backups
DEST_PATH_DB=/mnt/bfds/rob/backup/server/boogiedev.net/db
# EXCLUDE="--exclude-from exclude-list"
# ### Get all databases
# kick off DB dumping
curl --insecure --silent https://backup.boogiedev.net/dump_all_databases.php
# download DB dumps
cd $DEST_PATH_DB
curl --insecure --silent https://backup.boogiedev.net/dumps.zip > dumps.zip
if [ -f dumps.zip ]
then
today=`date +%F`
mv dumps.zip all_databases_dump_$today.zip
else
echo "Datenbank Dump konnte nicht herunter geladen werden"
fi
## aufräumen
curl --insecure --silent https://backup.boogiedev.net/dump_all_databases.php?cleanup_dump=1
-7
View File
@@ -1,7 +0,0 @@
backup_all_databases_cMxNrCTVLBPrNo6qaonojeejCvCepekwssh
nextcloud/config/config.php
nextcloud/data/root/files/Extern
nextcloud/updater
nextcloud/backup
/nextcloud-data/updater-*/
files_trashbin/
@@ -1 +0,0 @@
credentials.php
@@ -1,6 +0,0 @@
The content of this folder hast to be on the Boogie server at:
/var/www/virtual/boogie/html/backup-boogie
Its the server side enpoint of the backup script running on BFDS.
The credentials.php has to be filled but never commited to the git
@@ -1,83 +0,0 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$zipfile = "dumps.zip";
if (isset($_GET['cleanup_dump']) && $_GET['cleanup_dump'] == 1)
{
Cleanup();
die("Cleanup done");
}
$dumps_path = 'dumps/';
if(file_exists($dumps_path))
{
array_map( 'unlink', array_filter((array) glob($dumps_path.'*') ) );
}
else
{
mkdir('dumps');
}
//read php file with credentials and parse it
fopen("credentials.php", "r") or die("Unable to open file!");
include 'credentials.php';
//should priovide the following variables:
// $db_host = 'host';
// $db_user = 'user';
// $db_pass = 'pw';
if ($db_host == NULL || $db_user == NULL || $db_pass == NULL) {
die("Please provide credentials in credentials.php");
}
$db_conn = new mysqli($db_host, $db_user, $db_pass);
$result = mysqli_query($db_conn,"SHOW DATABASES");
while ($row = mysqli_fetch_array($result)) {
if($row[0] == 'information_schema' || $row[0] == 'performance_schema')
{
continue;
}
$database = $row[0];
$dir = dirname(__FILE__) . '/'.$dumps_path.$database.'.sql';
exec("mysqldump --user={$db_user} --password={$db_pass} --host={$db_host} {$database} --result-file={$dir} 2>&1", $output);
if(!empty($output))
{
var_dump($output);
}
}
## Zip all dumps
Cleanup($zipfile);
$zip = new ZipArchive;
if($zip -> open($zipfile, ZipArchive::CREATE ) === TRUE)
{
$dir = opendir($dumps_path);
while($file = readdir($dir)) {
if(is_file($dumps_path.$file)) {
$zip -> addFile($dumps_path.$file, $file);
}
}
$zip ->close();
}
//eine funktion die auf den url parameter cleanup_dump=1 reagiert und dann alle dumps löscht
function Cleanup()
{
global $zipfile;
if(file_exists($zipfile))
{
unlink($zipfile);
}
}
-4
View File
@@ -1,4 +0,0 @@
bfds soll sich regelmässig eine copy des wikis und aller scripte auf boogedev.net (uberspace) holen
Um keine hindernden Passwort-Eingaben zu haben, wird ein dezediertes keyfile ohne PW verwendet.
-21
View File
@@ -1,21 +0,0 @@
#!/bin/sh
# Hint: to exclude any directory (for example an cache dir)
# place the CACHEDIR.TAG file in there: https://bford.info/cachedir/
# don't forget the signature in there and set the parameter: --exclude-caches
export RESTIC_REPOSITORY=bfds:/mnt/bfds/rob-restic-backups/restic-repo-t520-user
export RESTIC_PASSWORD=kopenhagenhatsuperinternetwirklich
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# backup the whole user dir to bfds
#restic -r sftp:${RESTIC_REPOSITORY} backup /home/rob --exclude-caches --exclude-file=${SCRIPT_DIR}/backup.excludes
# find files in backup. $1 is the parameter from comand line.
# example: $ backup-list-files.sh /home/rob/Pictures > output.txt
# find all files containing Pictures path and out into output.txt
restic -r sftp:${RESTIC_REPOSITORY} find $1
#restic -r sftp:bfds:/mnt/bfds/rob-restic-backups/restic-repo-t520-user backup /home/rob --exclude-caches
-16
View File
@@ -1,16 +0,0 @@
#!/bin/sh
# Hint: to exclude any directory (for example an cache dir)
# place the CACHEDIR.TAG file in there: https://bford.info/cachedir/
# don't forget the signature in there and set the parameter: --exclude-caches
export RESTIC_REPOSITORY=bfds:/mnt/bfds/rob-restic-backups/restic-repo-t520-user
export RESTIC_PASSWORD=kopenhagenhatsuperinternetwirklich
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# backup the whole user dir to bfds
# restic -r sftp:${RESTIC_REPOSITORY} backup /home/rob --exclude-caches --exclude-file=${SCRIPT_DIR}/backup.excludes
#restic stats -r sftp:${RESTIC_REPOSITORY}
restic snapshots -r sftp:${RESTIC_REPOSITORY}
-21
View File
@@ -1,21 +0,0 @@
#Just Caches
**/.cache/
**/cache/
**/Cache/
#Logs
**/log/
**/logs/
**/Log/
**/Logs/
*.log
# VSCode
/home/rob/.config/Code/Cache
/home/rob/.config/Code/CachedData
/home/rob/.config/Code/CachedExtensions
/home/rob/.config/Code/CachedExtensionVSIXs
# Firefox und Co.
/home/rob/.mozilla
/home/rob/Downloads
-16
View File
@@ -1,16 +0,0 @@
#!/bin/sh
# Hint: to exclude any directory (for example an cache dir)
# place the CACHEDIR.TAG file in there: https://bford.info/cachedir/
# don't forget the signature in there and set the parameter: --exclude-caches
export RESTIC_REPOSITORY=bfds:/mnt/bfds/rob-restic-backups/restic-repo-t520-user
export RESTIC_PASSWORD=kopenhagenhatsuperinternetwirklich
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# backup the whole user dir to bfds
restic -r sftp:${RESTIC_REPOSITORY} backup /home/rob --exclude-caches --exclude-file=${SCRIPT_DIR}/backup.excludes
#restic -r sftp:bfds:/mnt/bfds/rob-restic-backups/restic-repo-t520-user backup /home/rob --exclude-caches
-12
View File
@@ -1,12 +0,0 @@
#!/bin/sh
# mount the backup into the file system
MOUNTPOINT="/mnt/restic-backup-me"
echo Erstelle Ordner $MOUNTPOINT via sudo
sudo mkdir $MOUNTPOINT
sudo chown rob:rob $MOUNTPOINT
echo Mount Backup
./restic-bfds.sh mount $MOUNTPOINT
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
# Hint: to exclude any directory (for example an cache dir)
# place the CACHEDIR.TAG file in there: https://bford.info/cachedir/
# don't forget the signature in there and set the parameter: --exclude-caches
export RESTIC_REPOSITORY=bfds:/mnt/bfds/rob-restic-backups/restic-repo-t520-user
export RESTIC_PASSWORD=kopenhagenhatsuperinternetwirklich
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# restic wrapper for use with command line arguments
restic -r sftp:${RESTIC_REPOSITORY} $1 $2 $3 $4 $5 $6 $7 $8 $9
-5
View File
@@ -1,5 +0,0 @@
#!/bin/sh
INCLUDE_FILES="/home/rob/Pictures/2022/*"
RESTORE_PATH="/home/rob/Pictures/from_restic/"
./restic-bfds.sh restore --target "$RESTORE_PATH" --include "$INCLUDE_FILES" latest
-7
View File
@@ -1,7 +0,0 @@
backup_all_databases_cMxNrCTVLBPrNo6qaonojeejCvCepekwssh
nextcloud/config/config.php
nextcloud/data/root/files/Extern
nextcloud/updater
nextcloud/backup
/nextcloud-data/updater-*/
files_trashbin/
-3
View File
@@ -1,3 +0,0 @@
This folder hast to be on the SBZ server
The credentials.php has to be filled but never commited to the git
@@ -1,58 +0,0 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$dumps_path = 'dumps/';
if(file_exists($dumps_path))
{
array_map( 'unlink', array_filter((array) glob($dumps_path.'*') ) );
}
else
{
mkdir('dumps');
}
$host = 'localhost';
$user = 'root';
$pass = "AdfQ3prfUDPu2MtaoLFtxvWbdBooJ6";
$db_conn = new mysqli($host, $user, $pass);
$result = mysqli_query($db_conn,"SHOW DATABASES");
while ($row = mysqli_fetch_array($result)) {
if($row[0] == 'information_schema' || $row[0] == 'performance_schema')
{
continue;
}
$database = $row[0];
$dir = dirname(__FILE__) . '/'.$dumps_path.$database.'.sql';
exec("mysqldump --user={$user} --password={$pass} --host={$host} {$database} --result-file={$dir} 2>&1", $output);
if(!empty($output))
{
var_dump($output);
}
}
## Zip all dumps
$zipfile = "dumps.zip";
if(file_exists($zipfile))
{
unlink($zipfile);
}
$zip = new ZipArchive;
if($zip -> open($zipfile, ZipArchive::CREATE ) === TRUE)
{
$dir = opendir($dumps_path);
while($file = readdir($dir)) {
if(is_file($dumps_path.$file)) {
$zip -> addFile($dumps_path.$file, $file);
}
}
$zip ->close();
}
-7
View File
@@ -1,7 +0,0 @@
bfds soll sich regelmässig eine copy der nextcloud instanz ziehen
Dazu wird der home-rob container im /home/rob gemountet und dann auf file basis eine Kopie vom kompletten /var/www/html
Nextcloud wird zu dem dazu in den maintenance mode versetzt.
Um keoine Passwort-Eingaben zu verhindern, wird ein dezediertes keyfile ohne PW verwendet.
-69
View File
@@ -1,69 +0,0 @@
#!/bin/sh
# this one makes a copy of the whole /var/www/html from sbz
#
# to recover nextcloud data see: https://docs.nextcloud.com/server/13/admin_manual/maintenance/restore.html
#
# rsync args:
# -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
# -r, --recursive recurse into directories
# -l, --links When symlinks are encountered, recreate the symlink on the destination.
# -h, --human-readable Output numbers in a more human-readable format.
SCRIPTPATH=$(dirname `realpath $0`)
cd $SCRIPTPATH
# rsync source -> destination
SOURCE_PATH=/var/www/
DEST_PATH_FILES=/mnt/bfds/rob/backup/server/spaceboyz.net/var_www
# ssh credentials
PORT="42523"
KEY="${SCRIPTPATH}/sbz_keyless"
USER_AT_HOST="rob@spaceboyz.net"
# path of the database backups
DEST_PATH_DB=/mnt/bfds/rob/backup/server/spaceboyz.net/mariadb
## path where home-rob container is mouted into host (on SBZ)
SBZ_MOUNT_PATH=/home/rob/tmp_mnt
## path of the nextcloud instance (on SBZ)
NEXTCLOUD_PATH=/var/www/html/nextcloud
EXCLUDE="--exclude-from exclude-list"
# mount my lxc container into my home on sbz
ssh -p $PORT -i $KEY $USER_AT_HOST "sudo mount /dev/mapper/vms-home--rob $SBZ_MOUNT_PATH"
# grand read permissons if not given
ssh -p $PORT -i $KEY $USER_AT_HOST "sudo chmod -R +rx ${SBZ_MOUNT_PATH}/var/www/nextcloud-data"
# put nextcloud into maintenance, outside the home-rob container
ssh -p $PORT -i $KEY $USER_AT_HOST "sudo sed -i \"s|'maintenance' => false|'maintenance' => true|g\" $SBZ_MOUNT_PATH$NEXTCLOUD_PATH/config/config.php"
# rsync download from sbz
rsync --quiet -a -zz --progress $EXCLUDE -e "ssh -p $PORT -i $KEY" $USER_AT_HOST:${SBZ_MOUNT_PATH}${SOURCE_PATH} ${DEST_PATH_FILES}
# turn off nextcloud maintenancThis rsync lacks old-style --compress due to its external zlibe, outside the home-rob container
ssh -p $PORT -i $KEY $USER_AT_HOST "sudo sed -i \"s|'maintenance' => true|'maintenance' => false|g\" $SBZ_MOUNT_PATH$NEXTCLOUD_PATH/config/config.php"
# umount my container
ssh -p $PORT -i $KEY $USER_AT_HOST "sudo umount $SBZ_MOUNT_PATH"
### Get all databases
cd $DEST_PATH_DB
# kick off DB dumping
curl --insecure --silent https://rob.spaceboyz.net/backup_all_databases_cMxNrCTVLBPrNo6qaonojeejCvCepekwssh/dump_all_databases.php
# download DB dumps
curl --insecure --silent https://rob.spaceboyz.net/backup_all_databases_cMxNrCTVLBPrNo6qaonojeejCvCepekwssh/dumps.zip > dumps.zip
if [ -f dumps.zip ]
then
today=`date +%F`
mv dumps.zip all_databases_dump_$today.zip
else
echo "Datenbank Dump konnte nicht herunter geladen werden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HAibJxlxNFfMx5DNwVsmI2iNuxmsj40jw8Wykar
iVDgotf7zgfNImxsf4aMWobe+fhlaSQLdClErQeVejcv1s1gEXsZTZ/I2J+Ac4KmG/WY89
iR5WgkPTIvJxAAAAE3JvYkBkM3YubG9jYWxkb21haW4BAgMEBQYH
-----END OPENSSH PRIVATE KEY-----
-1
View File
@@ -1 +0,0 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCrW6mg83W/cdQuaB/G0kjV3rTRUv76sXvTlyyauli6SjEsemfeDoVTDAsPUXu6ql+aKeAIE70dbq8uYdmu0hwZvUHNVcwLKIV9vTvoeMBAfNX81aTw+koXfZ6SR6MW8vaNK+b4eUYvTa4bS7FwrUXMgQV3mlnUpPLGgS+0K47id1hyxwOolzbLtGTdR1ucVzE+ZitHt3Vn6/AJ1KJV2+TFSZZXKhUp7lidHwrQt2x0n/zkQ/BW8+sL5b7/2G4kUL++OfF+nZjQGFZgnVIU28fmK1izkYtni2PYPzResy8r3eAwrqv5/8w7FqI3Lx2BkBHxKZU3sEOwV4Y5BBZACv4zk39VTJDaz55Asf7g+cCOFY0zqr/sYWek0zlPP2ccs9gi5gH/oLeLLCBPGCgefH6az8qfwvDu+gN0ugUo4aH4HfWEzZpS5klx3F12txxV514Z1RKSxvImuCg03SYvMX1cluusbO2uRj9VJ0VnA9g+UiEm/UJf9GgB450fXEcjJUyUyQ8eFyD7TPIKBzCxv0GDclKKzJeeUbfGkxQockpl3he1cIISfyoxPETyzTwIz/LOQsScMpC4W9r1yc0MJcNy8e0K6h/Bwev6tEqV0qIHzv5bnjVdDkKbEMMJ7LaBeUQstgJ4w3tgVxN6QgvTesDCRg4oWuqb5d82eAvl/9k+dQ== rob@d3v.localdomain
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.backup-recordings-to-bfds</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/rob/code/lokale-scripte/macos/Backup-Recordings/backup-recordings-to-bfds.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>12</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/Users/rob/code/lokale-scripte/macos/Backup-Recordings/run-backup-recordings_output.log</string>
<key>StandardErrorPath</key>
<string>/Users/rob/code/lokale-scripte/macos/Backup-Recordings/run-backup-recordings_error.log</string>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
@@ -1,40 +0,0 @@
#!/bin/bash
# Quelle und Ziel definieren
SOURCE="/Users/rob/Recordings/Work/"
TARGET="/Volumes/rob/recordings/Progress/Work/"
MOUNT_POINT="/Volumes/rob"
SERVER_ADDRESS="smb://bfds/rob"
# Prüfen, ob das Netzlaufwerk gemountet ist
if mount | grep -q "$MOUNT_POINT"; then
echo "Netzlaufwerk ist gemountet. Backup startet..."
else
echo "Netzlaufwerk nicht gefunden. Versuche zu mounten..."
osascript -e "mount volume \"$SERVER_ADDRESS\""
# Nach dem Mounten erneut prüfen
if mount | grep -q "$MOUNT_POINT"; then
echo "Netzlaufwerk erfolgreich gemountet."
else
echo "Fehler: Netzlaufwerk konnte nicht gemountet werden."
osascript -e 'display notification "Backup fehlgeschlagen! Netzlaufwerk nicht erreichbar." with title "Backup Script"'
exit 1
fi
fi
# Sicherung starten
rsync -v -r -l -t -D "$SOURCE" "$TARGET"
# -r → Rekursiv kopieren (alle Unterordner & Dateien)
# -l → Symbolische Links kopieren
# -t → Zeitstempel beibehalten
# -D → Geräte- und Sonderdateien kopiere
# Erfolgsmeldung ausgeben
echo "Backup abgeschlossen: $DATE"
# Optional: Notification für macOS anzeigen
osascript -e 'display notification "Backup abgeschlossen!" with title "Backup Script"'
@@ -1,70 +0,0 @@
@ECHO OFF
CHCP 65001 >NUL
REM **************************************************
REM Dieser command sichert die Inhalt von bfds in windows
REM auf der OFFSITE platte (Veracrypt Partition) mittels
REM SMB Freigaben von bfds und xcopy.
REM **************************************************
SETLOCAL
REM **************************************************
REM Einbinden der Veracrypt Partition
REM **************************************************
echo Festplatte NASOFFSITE1 wird entschlüsselt und eingebunden
SET VOLUME_LABEL=NASOFFSITE1
SET VERACRYPT_PATH="C:\Program Files\VeraCrypt\VeraCrypt.exe"
SET VOLUME_MOUNT_PATH="B:\"
SET VOLUME_PASSWORD=123456
REM get the Password for the volume from the user
SET /P VOLUME_PASSWORD=Bitte geben Sie das Passwort für die Festplatte %VOLUME_LABEL% ein:
%VERACRYPT_PATH% /q /v "\Device\Harddisk2\Partition1" /l B /p "%VOLUME_PASSWORD%"
SET SOURCE=\\bfds
SET DESTINATION="B:\\"
echo Festplatte NASOFFSITE1 wird gesucht
IF NOT EXIST %DESTINATION% (
echo Festplatte NASOFFSITE1 nicht gefunden, bitte in Veracrypt als Laufwerk B:\ einbinden!
PAUSE
exit /B
)
CALL :RunRobocopy "ebooks"
CALL :RunRobocopy "movies"
CALL :RunRobocopy "music"
CALL :RunRobocopy "peggy"
CALL :RunRobocopy "rob"
exit /B %ERRORLEVEL%
REM **************************************************
REM Funktion zum Ausführen von robocopy
:RunRobocopy
SET COPYPATH=%~1
IF NOT EXIST %SOURCE%\%COPYPATH% (
echo Quelle nicht gefunden! Bitte öffne die SMB Freigbe: %SOURCE%\%COPYPATH%
PAUSE
exit /B %ERRORLEVEL%
)
SET SCRIPT_PATH=%~dp0
SET TODAY=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%
SET LOGFILE="%SCRIPT_PATH%robocopy_log_%COPYPATH%_%TODAY%.txt"
echo LOGFILE: %LOGFILE%
robocopy %SOURCE%\%COPYPATH% %DESTINATION%\%COPYPATH% /E /mt /z /J /COPY:DAT /R:3 /W:5 /LOG+:%LOGFILE% /TEE
REM Erklärung der Parameter:
REM /E: Kopiert Unterverzeichnisse inklusive leerer Verzeichnisse
REM /mt: Multithreaded copying
REM /z: Kopiert Dateien im Restart-Modus (d.h. kopiert Dateien, die bereits existieren)
REM /COPY:DAT: Kopiert Dateiattribute, Zeitstempel und Sicherheitsinformationen
REM /R:3: Anzahl der Wiederholungsversuche bei Fehlern
REM /W:5: Wartezeit zwischen den Wiederholungsversuchen
REM /J: Kopiert mit unbuffered I/O (empfohlen für große Dateien)
REM /LOG+: Protokolliert den Kopiervorgang in eine Datei
REM /TEE: Protokolliert den Kopiervorgang auch in der Konsole
GOTO :EOF
REM **************************************************
REM **************************************************
REM Partiton wieder aushängen
REM **************************************************
%VERACRYPT_PATH% /d B /q
-8
View File
@@ -1,8 +0,0 @@
bfds soll ein funktionierendes off-site backup bekommen
Dazu sollte am besten eine USB-HDD direkt an bfds gehangen werdn das automatisch überspielt wird.
Oder die Platte kommt an den Lappi und ein rsync zieht sich alle Änderungen von bfds:/mnt/bfds nach /run/media/rob/BFDS-OFFSITE-1/
Label HDD1: BFDS-OFFSITE-1
Label HDD2: BFDS-OFFSITE-2
-32
View File
@@ -1,32 +0,0 @@
#!/bin/sh
# FIRST Encrypt!
## von Hand und mit Dolphin
# only run when BFDS-OFFSITE-1 or BFDS-OFFSITE-2 is attached
# find correct drive `ls -l /dev/disk/by-label/BFDS-OFFSITE-1` or `lsblk -o name,mountpoint,label,size,uuid /dev/sdb1 | grep BFDS-OFFSITE-`
# BFDS-OFFSITE-1 UUID: 45f76efd-1cb0-4ade-b610-0443eb8079e9
# find correct drive `ls -l /dev/disk/by-label/BFDS-OFFSITE-1` or `lsblk -o name,mountpoint,label,size,uuid /dev/sdb1 | grep BFDS-OFFSITE-`
echo "#####################################################"
echo "## ##"
echo "## BFDS-OFFSITE BACKUP ##"
echo "## ##"
echo "#####################################################"
echo "## FIRST Encrypt HDD! von Hand und mit Dolphin ##"
echo "#####################################################"
string=`ls -l /dev/disk/by-label/BFDS-OFFSITE-*`
if [[ $string != *"BFDS-OFFSITE-"* ]]; then
echo "\n ABBRUCH! Keine angeschlossene OFFSITE Festplatte gefunden."
exit 0
fi
# run backup
sourceDir="bfds:/mnt/bfds/" # on BFDS
destinationDir="/run/media/rob/BFDS-OFFSITE-1/BFDS"
rsync -a -zz --stats --progress $sourceDir $destinationDir
read -p "Backupprozess beendet. Taste drücken für weiter.."