rm -r $1/VERZEICHNIS
/usr/syno/bin/rsync -avh /volumeX/SHARE/ $1/VERZEICHNIS
#!rm -rf "$1/NAS-MP_1/Daten/down"
#!rm -rf "$1/NAS-MP_1/Daten/down"
#!/bin/sh
/var/packages/autorun/target/localbackup "MP-Backup" "/volumeUSB1/usbshare" "$1" 100
exit $?
#!/bin/sh
#backup in 2 versionen
LOGFILE=$1/autorun.txt
LOGFILElokal=/volume1/homes/Urban51/NASstuff/autorun.txt
log() {
echo `date +%c` $1 >> $LOGFILE
echo `date +%c` $1 >> $LOGFILElokal
}
#welches backup zuletzt?
zeigerdatei=$1/letztesbackup.txt
letztesbackup=`cat $zeigerdatei`
OK=100
if [ "$letztesbackup" -eq 1 ]; then
#jetzt backup 2
/var/packages/autorun/target/localbackup "backup2" "/volumeUSB1/usbshare" "$1" 100
if [ $? -ne 100 ]; then
OK=101
log "Backup 2 fehlgeschlagen"
exit $OK
fi
#markieren fuers naechste mal
echo 2 > $zeigerdatei
log "Backup 2 lief"
elif [ "$letztesbackup" -eq 2 ]; then
#jetzt backup 3
/var/packages/autorun/target/localbackup "backup3" "/volumeUSB1/usbshare" "$1" 100
if [ $? -ne 100 ]; then
OK=101
log "Backup 3 fehlgeschlagen"
exit $OK
fi
echo 3 > $zeigerdatei
log "Backup 3 lief"
elif [ "$letztesbackup" -eq 3 ]; then
#jetzt backup 1
/var/packages/autorun/target/localbackup "backup1" "/volumeUSB1/usbshare" "$1" 100
if [ $? -ne 100 ]; then
OK=101
log "Backup 1 fehlgeschlagen"
exit $OK
fi
echo 1 > $zeigerdatei
log "Backup 1 lief"
else
log "Konnte letztes Backup nicht ermitteln"
fi
#Backup des SynoBackup
/var/packages/autorun/target/localbackup "SynoBackupBackup" "/volumeUSB1/usbshare" "$1" 100
if [ $? -ne 100 ]; then
OK=101
log "SynoBackupBackup fehlgeschlagen"
exit $OK
fi
log "SynoBackupBackup lief"
exit $OK
#!/bin/sh
#creates a new version for time backup task and checks every 10mins if its still running
TASK_NAME=notfallbackup
TASK_NR=1
LOGFILE=$1/autorun.txt
LOGFILElokal=/volume1/homes/Urban51/NASstuff/autorun.txt
log() {
echo `date +%c` $1 >> $LOGFILE
echo `date +%c` $1 >> $LOGFILElokal
}
#geht nicht mehr. fehlermeldung segmentation fault (core dumped)
#/usr/syno/bin/timebkp create_version --task=$TASK_NAME
/usr/syno/bin/timebkp create_version --unique $TASK_NR
log "Creating Version for $TASK_NAME started"
#checking if rsync is still processing
sleep 600
while [ "$( /usr/syno/bin/timebkp list_version --task=$TASK_NAME | grep processing )" ]
do
sleep 600
done
#copy config
cp -Rpf /usr/syno/etc/packages/TimeBackup $1/TimeBackupKonfig
#http://www.epochconverter.com/ <für timestamps im konfig file
log "Creating Version for $TASK_NAME finished"
/var/packages/autorun/target/localbackup "SynoBackupBackup500er" "/volumeSATA/satashare" "$1" 100
if [ $? -ne 100 ]; then
log "SynoBackupBackup500er fehlgeschlagen"
exit 101
fi
log "SynoBackupBackup500er lief"
exit 100
2013-11-30 00:11:49: device 'sdc' - inserted, trying to find mount point
2013-11-30 00:11:56: device 'sdc' - mount point '/volumeSATA/satashare' found
2013-11-30 00:11:56: device 'sdc' - script '/volumeSATA/satashare/autorun.sh' found, executing
2013-11-30 00:11:59: device 'sdc' - script '/volumeSATA/satashare/autorun.sh' finished (456.7G left on device), no further actions
2013-11-30 00:12:06: device '/volumeSATA/satashare' - local backup 'backup3' started
2013-11-30 01:30:45: device 'sdc' - inserted, trying to find mount point
2013-11-30 01:30:54: device 'sdc' - mount point '/volumeSATA/satashare' found
2013-11-30 01:30:54: device 'sdc' - script '/volumeSATA/satashare/autorun.sh' found, executing
2013-11-30 01:30:58: device 'sdc' - script '/volumeSATA/satashare/autorun.sh' finished (749.9G left on device), no further actions
2013-11-30 01:31:05: device '/volumeSATA/satashare' - local backup 'backup1' started
2013-11-30 02:14:54: device '/volumeSATA/satashare' - local backup 'backup1' finished
#!/bin/sh
if [ -z "$1" ]
then
echo "incorrect '\$1' - aborting ..."
exit 1
fi
# RIC: add sleep
# device is mounted, unmounted and mounted again
/bin/sleep 20
source /var/packages/autorun/target/config
TRIES=20
LOGDIR="/var/packages/autorun/target"
[...]
#!/bin/sh
#creates a new version for time backup task and checks every 1mins if its still running
PATH=/opt/bin:/opt/sbin:/syno/bin:/usr/syno/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
LOGFILE=$1/autorun.log
exec >$LOGFILE 2>&1
TASK_NAME=mytaskname
log() {
echo "`date +%c`: $1"
}
log "STARTED creating version for $TASK_NAME"
# workaround for now, --task segfaulting
# timebkp create_version --task=$TASK_NAME
timebkp create_version --unique=1
sleep 10
# the latest backup is last, 5 lines describe it
log "$( timebkp list_version --task=$TASK_NAME | grep -A 4 "version:" | tail -n 5 )"
#checking if time backup is still processing
while [ "$( timebkp list_version --task=$TASK_NAME | grep processing )" ]
do
sleep 60
done
log "FINISHED creating version for $TASK_NAME"
# the latest backup is last, 5 lines describe it
log "$( timebkp list_version --task=$TASK_NAME | grep -A 4 "version:" | tail -n 5 )"
cat $LOGFILE | nail -s "MyMachine: autorun TimeBackup $TASK_NAME" mymail@my.host
exit 100
Es wird schon gewartet bis der Mount fertig ist (die while-Schleife).Man müsste hier irgendwie in /var/packages/autorun/target/autorun oder in /usr/syno/hotplug.d/default/99autorun.hotplug warten/prüfen bis der mount wirklich abgeschlossen ist.
Ja, das habe ich schon gesehen, allerdings wird wie gesagt gemountet, umountet und wieder gemountet.Es wird schon gewartet bis der Mount fertig ist (die while-Schleife).
Dec 30 23:41:24 FortKnox hotplugd: ##### ACTION:add
Dec 30 23:41:24 FortKnox hotplugd: DEVNAME:sdc
Dec 30 23:41:24 FortKnox hotplugd: DEVICE:/proc/bus/usb/000/000
Dec 30 23:41:24 FortKnox hotplugd: DEVGUID:WD-WCAU429208370
Dec 30 23:41:24 FortKnox hotplugd: DEVPATH:sdc
Dec 30 23:41:24 FortKnox hotplugd: SUBSYSTEM:block
Dec 30 23:41:24 FortKnox hotplugd: PHYSDEVPATH:/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/host2/target2:0:0/2:0:0:0
Dec 30 23:41:24 FortKnox hotplugd: usb_get_device_id.c:56 failed get usb id Vendor=0000, ProdID=0000, SN=0000:01:0d.0
Dec 30 23:41:24 FortKnox hotplugd: hotplugd.c:793 Get usb id failed, DEVICE=/proc/bus/usb/000/000, error=No medium found
Dec 30 23:41:24 FortKnox hotplugd: hotplugd.c:1417 failed to setup usb config, (DEVPATH, DEVICE, ACTION, DEVNAME, INTERFACE)=(sdc, /proc/bus/usb/000/000, add, sdc, )
Dec 30 23:41:24 FortKnox hotplugd: hotplugd.c (1439) ==== eSATA device [sdc] plugged in ====
Dec 30 23:41:24 FortKnox hotplugd: SYNOUSBIGetNumByName(42): fail to get the value for key [sdc]
Dec 30 23:41:24 FortKnox hotplugd: SYNOUSBDevGetInfo: get devnum & busnum for [sdc]
Dec 30 23:41:24 FortKnox timebkp: [10412]BK_WARN:Getting path of destination share failed
Dec 30 23:41:24 FortKnox umount: Kill the process "autorun" with /volumeSATA/satashare/autorun.log.
Dec 30 23:41:24 FortKnox umount: Kill the process "timebkp" with /volumeSATA/satashare/autorun.log.
Dec 30 23:41:24 FortKnox umount: Kill the process "timebkp" with /volumeSATA/satashare/autorun.log.
Dec 30 23:41:26 FortKnox kernel: [92371.691133] EXT3-fs (sdc1): error: couldn't mount because of unsupported optional features (240)
Mon Dec 30 23:40:48 2013: arguments (block) env (DEVNAME=sdc1
ACTION=add
HOME=/
SEQNUM=1626
MAJOR=8
DEVPATH=/block/sdc/sdc1
SUBSYSTEM=block
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MINOR=33
PHYSDEVPATH=/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/host2/target2:0:0/2:0:0:0
PHYSDEVDRIVER=sd
PHYSDEVBUS=scsi
PWD=/
DEVTYPE=partition)
2013-12-31 14:34:15: device 'sdg' - inserted, trying to find mount point
2013-12-31 14:34:21: device 'sdg' - mount point '/volumeSATA/satashare' found
2013-12-31 14:34:21: device 'sdg' - script '/volumeSATA/satashare/autorun' found, executing
2013-12-31 14:34:21: device '/volumeSATA/satashare' - mounting the encrypted file system
2013-12-31 14:34:22: device 'sdg' - script '/volumeSATA/satashare/autorun' finished (142.0G left on device), no further actions
2013-12-31 14:34:33: device '/volumeSATA/satashare' - local backup 'Cloud-Auf-eSATA-sichern' started
2013-12-31 14:35:14: device '/volumeSATA/satashare' - local backup 'Cloud-Auf-eSATA-sichern' finished
2013-12-31 14:35:14: device '/volumeSATA/satashare' - unmounting the encrypted file system
2013-12-31 14:35:14: device '/volumeSATA/satashare' - problem while unmounting the encrypted file system, aborting
Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.
Als Dankeschön schalten wir deinen Account werbefrei.