Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Brauche mal Hilfe für #linux #debian #trixie #nas #usbraid #nfs #usb #rsync #bash.

Brauche mal Hilfe für #linux #debian #trixie #nas #usbraid #nfs #usb #rsync #bash.

Scheduled Pinned Locked Moved Uncategorized
linuxdebiantrixienasusbraid
9 Posts 3 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • daumenlutscher@fedifreu.deD This user is from outside of this forum
    daumenlutscher@fedifreu.deD This user is from outside of this forum
    daumenlutscher@fedifreu.de
    wrote last edited by
    #1

    Brauche mal Hilfe für #linux #debian #trixie #nas #usbraid #nfs #usb #rsync #bash.

    Ich habe ein #Script das nicht funktioniert und doch funktioniert *grrrr*

    (Script Begin)
    #!/bin/bash

    set -ex

    # check for mount
    grep /backup /etc/mtab > /dev/null || exit 1

    # directory to backup
    BDIR=/home/wilma_wein/

    # Destination dir for rsync
    DDIR=/media/backup

    # excludes file - this contains a wildcard pattern per line of files to exclude
    EXCLUDES=/root/rsy.excl

    # BACKUPDIR=${1:-`date +%A`}
    BACKUPDIR=${1:-"day"`date +%d`}

    OPTS="--force
    --ignore-errors \
    --delete-excluded \
    --exclude-from=$EXCLUDES
    --delete --backup --backup-dir=$DDIR/$BACKUPDIR -a -v"

    export PATH=$PATH:/bin:/usr/bin:/usr/local/bin

    # if destination does not exist, make it;-)
    [ -d $DDIR ] || mkdir $DDIR

    # write logfile
    echo oooooooooooooooooooooooooooooooooooooooooooo >> /root/rsy.log
    date >> /root/rsy.log

    # delete existing backup dir
    [ -d $DDIR/$BACKUPDIR ] && (echo remaking $DDIR/$BACKUPDIR >> /root/rsy.log; rm -r $DDIR/$BACKUPDIR)

    # now the actual transfer
    rsync $OPTS $BDIR $DDIR/current >> /root/rsy.log

    (Script Ende)
    .
    .
    Dieses Script soll mir mein komplettes /home sichern und gelöschte dateien in den heutigen Tag (Ordner day20 anlegen) und die gelöschte oder alte Datei (sofern geändert) verschieben. Die geänderte neue Datei im BackUp Ordner belassen.

    Folgende Laufwerke sind in meiner #fstab gemountet:

    # Angeschlossenes USB RAID Laufwerk.
    /dev/sdb1 /media/USBRaid ext4 auto,nouser,exec,async,noatime 0 0
    # Network Attached Storage Synology
    192.168.2.120:/volume1/backup /media/synology223j/backup nfs auto,user,exec,async,noatime 0 0
    .
    .
    Das Script funktioniert einwandfrei mit dem #USBRaid Laufwerk (RAID 0 - Striping)
    aber nicht mit dem #Synology #NAS (RAID 1 - Mirroring), dort wird mir mein /home auch im Tagesordner gespeichert.
    .
    .
    ??? Kann sich hier wer vorstellen oder weiß warum das mit der #NAS nicht funzt ???

    dasaweb@wue.socialD atzinger@mastodon.socialA 2 Replies Last reply
    1
    0
    • daumenlutscher@fedifreu.deD daumenlutscher@fedifreu.de

      Brauche mal Hilfe für #linux #debian #trixie #nas #usbraid #nfs #usb #rsync #bash.

      Ich habe ein #Script das nicht funktioniert und doch funktioniert *grrrr*

      (Script Begin)
      #!/bin/bash

      set -ex

      # check for mount
      grep /backup /etc/mtab > /dev/null || exit 1

      # directory to backup
      BDIR=/home/wilma_wein/

      # Destination dir for rsync
      DDIR=/media/backup

      # excludes file - this contains a wildcard pattern per line of files to exclude
      EXCLUDES=/root/rsy.excl

      # BACKUPDIR=${1:-`date +%A`}
      BACKUPDIR=${1:-"day"`date +%d`}

      OPTS="--force
      --ignore-errors \
      --delete-excluded \
      --exclude-from=$EXCLUDES
      --delete --backup --backup-dir=$DDIR/$BACKUPDIR -a -v"

      export PATH=$PATH:/bin:/usr/bin:/usr/local/bin

      # if destination does not exist, make it;-)
      [ -d $DDIR ] || mkdir $DDIR

      # write logfile
      echo oooooooooooooooooooooooooooooooooooooooooooo >> /root/rsy.log
      date >> /root/rsy.log

      # delete existing backup dir
      [ -d $DDIR/$BACKUPDIR ] && (echo remaking $DDIR/$BACKUPDIR >> /root/rsy.log; rm -r $DDIR/$BACKUPDIR)

      # now the actual transfer
      rsync $OPTS $BDIR $DDIR/current >> /root/rsy.log

      (Script Ende)
      .
      .
      Dieses Script soll mir mein komplettes /home sichern und gelöschte dateien in den heutigen Tag (Ordner day20 anlegen) und die gelöschte oder alte Datei (sofern geändert) verschieben. Die geänderte neue Datei im BackUp Ordner belassen.

      Folgende Laufwerke sind in meiner #fstab gemountet:

      # Angeschlossenes USB RAID Laufwerk.
      /dev/sdb1 /media/USBRaid ext4 auto,nouser,exec,async,noatime 0 0
      # Network Attached Storage Synology
      192.168.2.120:/volume1/backup /media/synology223j/backup nfs auto,user,exec,async,noatime 0 0
      .
      .
      Das Script funktioniert einwandfrei mit dem #USBRaid Laufwerk (RAID 0 - Striping)
      aber nicht mit dem #Synology #NAS (RAID 1 - Mirroring), dort wird mir mein /home auch im Tagesordner gespeichert.
      .
      .
      ??? Kann sich hier wer vorstellen oder weiß warum das mit der #NAS nicht funzt ???

      dasaweb@wue.socialD This user is from outside of this forum
      dasaweb@wue.socialD This user is from outside of this forum
      dasaweb@wue.social
      wrote last edited by
      #2

      @daumenlutscher Ich würde die Frage genau so mal in ein LLM deiner Wahl werfen, bin mir sicher, damit kommst du weiter.

      daumenlutscher@fedifreu.deD 1 Reply Last reply
      0
      • dasaweb@wue.socialD dasaweb@wue.social

        @daumenlutscher Ich würde die Frage genau so mal in ein LLM deiner Wahl werfen, bin mir sicher, damit kommst du weiter.

        daumenlutscher@fedifreu.deD This user is from outside of this forum
        daumenlutscher@fedifreu.deD This user is from outside of this forum
        daumenlutscher@fedifreu.de
        wrote last edited by
        #3

        @dasaweb
        LLM?
        Hilfe, bitte nicht!

        dasaweb@wue.socialD 1 Reply Last reply
        0
        • daumenlutscher@fedifreu.deD daumenlutscher@fedifreu.de

          @dasaweb
          LLM?
          Hilfe, bitte nicht!

          dasaweb@wue.socialD This user is from outside of this forum
          dasaweb@wue.socialD This user is from outside of this forum
          dasaweb@wue.social
          wrote last edited by
          #4

          @daumenlutscher Na gut, wer nicht will, der hat schon.

          daumenlutscher@fedifreu.deD 1 Reply Last reply
          0
          • dasaweb@wue.socialD dasaweb@wue.social

            @daumenlutscher Na gut, wer nicht will, der hat schon.

            daumenlutscher@fedifreu.deD This user is from outside of this forum
            daumenlutscher@fedifreu.deD This user is from outside of this forum
            daumenlutscher@fedifreu.de
            wrote last edited by
            #5

            @dasaweb
            Das liegt eher daran, dass ich davon minus null Ahnung habe.
            Ich habe von diesen Sachen (LLM) einen großen Bogen drum gemacht uuuuuund mich damit noch nie beschäftigt. 🤷🏻‍♀️

            dasaweb@wue.socialD 1 Reply Last reply
            0
            • daumenlutscher@fedifreu.deD daumenlutscher@fedifreu.de

              Brauche mal Hilfe für #linux #debian #trixie #nas #usbraid #nfs #usb #rsync #bash.

              Ich habe ein #Script das nicht funktioniert und doch funktioniert *grrrr*

              (Script Begin)
              #!/bin/bash

              set -ex

              # check for mount
              grep /backup /etc/mtab > /dev/null || exit 1

              # directory to backup
              BDIR=/home/wilma_wein/

              # Destination dir for rsync
              DDIR=/media/backup

              # excludes file - this contains a wildcard pattern per line of files to exclude
              EXCLUDES=/root/rsy.excl

              # BACKUPDIR=${1:-`date +%A`}
              BACKUPDIR=${1:-"day"`date +%d`}

              OPTS="--force
              --ignore-errors \
              --delete-excluded \
              --exclude-from=$EXCLUDES
              --delete --backup --backup-dir=$DDIR/$BACKUPDIR -a -v"

              export PATH=$PATH:/bin:/usr/bin:/usr/local/bin

              # if destination does not exist, make it;-)
              [ -d $DDIR ] || mkdir $DDIR

              # write logfile
              echo oooooooooooooooooooooooooooooooooooooooooooo >> /root/rsy.log
              date >> /root/rsy.log

              # delete existing backup dir
              [ -d $DDIR/$BACKUPDIR ] && (echo remaking $DDIR/$BACKUPDIR >> /root/rsy.log; rm -r $DDIR/$BACKUPDIR)

              # now the actual transfer
              rsync $OPTS $BDIR $DDIR/current >> /root/rsy.log

              (Script Ende)
              .
              .
              Dieses Script soll mir mein komplettes /home sichern und gelöschte dateien in den heutigen Tag (Ordner day20 anlegen) und die gelöschte oder alte Datei (sofern geändert) verschieben. Die geänderte neue Datei im BackUp Ordner belassen.

              Folgende Laufwerke sind in meiner #fstab gemountet:

              # Angeschlossenes USB RAID Laufwerk.
              /dev/sdb1 /media/USBRaid ext4 auto,nouser,exec,async,noatime 0 0
              # Network Attached Storage Synology
              192.168.2.120:/volume1/backup /media/synology223j/backup nfs auto,user,exec,async,noatime 0 0
              .
              .
              Das Script funktioniert einwandfrei mit dem #USBRaid Laufwerk (RAID 0 - Striping)
              aber nicht mit dem #Synology #NAS (RAID 1 - Mirroring), dort wird mir mein /home auch im Tagesordner gespeichert.
              .
              .
              ??? Kann sich hier wer vorstellen oder weiß warum das mit der #NAS nicht funzt ???

              atzinger@mastodon.socialA This user is from outside of this forum
              atzinger@mastodon.socialA This user is from outside of this forum
              atzinger@mastodon.social
              wrote last edited by
              #6

              Im Skript ist dein Destination-Dir /media/backup. In deiner fstab wird weder das eine noch das andere dorthin gemountet.

              daumenlutscher@fedifreu.deD 1 Reply Last reply
              0
              • daumenlutscher@fedifreu.deD daumenlutscher@fedifreu.de

                @dasaweb
                Das liegt eher daran, dass ich davon minus null Ahnung habe.
                Ich habe von diesen Sachen (LLM) einen großen Bogen drum gemacht uuuuuund mich damit noch nie beschäftigt. 🤷🏻‍♀️

                dasaweb@wue.socialD This user is from outside of this forum
                dasaweb@wue.socialD This user is from outside of this forum
                dasaweb@wue.social
                wrote last edited by
                #7

                @daumenlutscher Geh einfach mal auf https://chatgpt.com und kopiere deinen Toot komplett rein. Einfach unformatiert. Und schau, was passiert.

                daumenlutscher@fedifreu.deD 1 Reply Last reply
                0
                • dasaweb@wue.socialD dasaweb@wue.social

                  @daumenlutscher Geh einfach mal auf https://chatgpt.com und kopiere deinen Toot komplett rein. Einfach unformatiert. Und schau, was passiert.

                  daumenlutscher@fedifreu.deD This user is from outside of this forum
                  daumenlutscher@fedifreu.deD This user is from outside of this forum
                  daumenlutscher@fedifreu.de
                  wrote last edited by
                  #8

                  @dasaweb
                  Danke.
                  Das bringt mich weiter.
                  Ist voll cool

                  1 Reply Last reply
                  0
                  • atzinger@mastodon.socialA atzinger@mastodon.social

                    Im Skript ist dein Destination-Dir /media/backup. In deiner fstab wird weder das eine noch das andere dorthin gemountet.

                    daumenlutscher@fedifreu.deD This user is from outside of this forum
                    daumenlutscher@fedifreu.deD This user is from outside of this forum
                    daumenlutscher@fedifreu.de
                    wrote last edited by
                    #9

                    @atzinger
                    Das ist Richtig, das habe ich in diesem script nicht angepasst, das Original im cron Ordner stimmt dagegen schon. Habe nicht aufgepasst. Danke.

                    1 Reply Last reply
                    0
                    • R relay@relay.an.exchange shared this topic
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups