wlin003_GamingPC/home/config-rsync.nix aktualisiert

This commit is contained in:
Henrik Lutzmann 2025-02-06 17:56:23 +01:00
parent 27efcd545d
commit 8f5379b0f1
1 changed files with 79 additions and 48 deletions

View File

@ -1,48 +1,79 @@
{ config, pkgs, ... }:
{
home.file = {
".rsync-exlude" = {
text = ''
- Downloads
- Games
- Share-Cloud
- Share-Priv
- Share-SMB
- Share-VM
- Sync
- VM-Image
- Code Cache
- cache*
- Cache*
- Cache_*
- *_cache
- *Cache
- DawnGraphiteCache
- log*
- logs
- tmp
- Trash
+ .config
- .config/syncthing
- .config/unity3d
- .config/ownCloud
+ .local
- .local/state
- .local/share/containers
- .local/share/flatpak
- .local/share/keyrings
- .local/share/nomic.ai
- .local/share/Steam
+ .jd2
+ .conkyrc
- .*
- *.LOG
- LOG
- *.old
'';
};
};
}
{ config, pkgs, ... }:
{
home.file = {
".rsync-backup.sh" = {
executable = true;
text = ''
#!/bin/sh
#
################################################################################
#
# Push Home Zulumann to Fileserver01/Backup/$HOSTNAME/
#
################################################################################
# -a (Kurzversion für --archive): gleiche Bedeutung wie -rlptgoD
# -r (Kurzversion für --recursive): Unterverzeichnisse kopieren
# -l (Kurzversion für --links): symbolische Links kopierenrsync
# -p (Kurzversion für --perms): Rechte der Quelldatei beibehalten
# -t (Kurzversion für --times): Zeiten der Quelldatei beibehalten
# -g (Kurzversion für --group): Gruppenrechte der Quelldatei beibehalten
# -o (Kurzversion für --owner): Besitzrechte der Quelldatei beibehalten (nur als root User möglich)
# -D (Kurzversion für --devices --specials): Gerätedateien der Quelldatei beibehalten (nur als root User möglich)
# -v (Kurzversion für --verbose): zeigt während der Ausführung an welche Dateien synchronisiert werden
# -z
# --delete: entfernt Dateien im Zielverzeichnis die mittelerweile im Quellverzeichnis nicht mehr vorhanden sind
# rsync --dry-run
################################################################################
# rsync -rdt rsync://192.168.10.52/
#
rsync -a -v --exclude-from=/home/$USER/.rsync-exlude --delete --progress --partial /home/$USER/ rsync://192.168.10.52:873/Backup/$HOSTNAME/ -b --backup-dir=01rsync-trash/ 2>&1 | tee /home/$USER/.rsync-backup.log
'';
};
};
home.file = {
".rsync-exlude" = {
text = ''
- Downloads
- Games
- Share-Cloud
- Share-Priv
- Share-SMB
- Share-VM
- Sync
- VM-Image
- Code Cache
- cache*
- Cache*
- Cache_*
- *_cache
- *Cache
- DawnGraphiteCache
- log*
- logs
- tmp
- Trash
+ .config
- .config/syncthing
- .config/unity3d
- .config/ownCloud
+ .local
- .local/state
- .local/share/containers
- .local/share/flatpak
- .local/share/keyrings
- .local/share/nomic.ai
- .local/share/Steam
+ .jd2
+ .conkyrc
- .*
- *.LOG
- LOG
- *.old
'';
};
};
}