consolidate all repos to one for archive

This commit is contained in:
2025-01-28 13:46:42 +01:00
commit a6610fbc7a
5350 changed files with 2705721 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
backup_type=$1
backup_dir="/mnt/backup/26097"
source_dir="/home"
if [ "$backup_type" == "incremental" ]; then
for userdir in /home/*; do
rdiff-backup --exclude="$userdir/Maildir" $source_dir "$backup_dir/othinc"
done
elif [ "$backup_type" == "mirror" ]; then
for userdir in /home/*; do
rsync -va --exclude="$userdir/Maildir" $source_dir "$backup_dir/othmir"
done
else
echo "Napaka: Neveljaven način izdelave kopije."
exit 1
fi