Moderator: ModTeam
Code: Select all
amsadmin# cat backupbutton.conf
#!/bin/sh
#
# config file for backupbutton package
#
# $VER: 0.99 (lochness, 2008-11-16)
# set LOGGING to 1 to write log files. Caution, you have to delete logfiles manu
ally.
# Values: only 0 and 1 are valid
LOGGING=1
# This is the default folder of the log files, you can change this, if you want
# This must be an absolute path
# Default: $NEXT_TMP/backuplogs
LOGFILEDIR=$NEXT_TMP/backuplogs
# This is the configuration of the devices and the order in which they are proce
ssed
# The first device that is found is used for backup. Please change the order if
you want
# but be careful to keep the syntax. Variables may also be commented out with a
#
# Default: Device1: /mnt/esata_disk, ESATA, unused
# Device2: /mnt/usbdisk3-1, USB, PORT21
# Device3: /mnt/usbdisk1-1, USB, PORT01
# Device4: /mnt/usbdisk2-1, USB, PORT11
DESTDEVICE1=/mnt/esata_disk
DESTTYPE1=ESATA
PORTNAME1=unused
DESTDEVICE2=/mnt/usbdisk3-1
DESTTYPE2=USB
PORTNAME2=PORT21
DESTDEVICE3=/mnt/usbdisk1-1
DESTTYPE3=USB
PORTNAME3=PORT01
DESTDEVICE4=/mnt/usbdisk2-1
DESTTYPE4=USB
PORTNAME4=PORT11
# Alternatively, you can also set the destination to one folder
# by uncommenting and setting of the variables below
# Please be careful to set all three and to keep the syntax
#DESTDEVICE=/mnt/usbdisk3-1
#DESTTYPE=USB
#PORTNAME=PORT21
# This is the destination folder on the USB/eSATA device
# usable keywords: $HOSTNAME: name of the device, e.g. AMS150
# $NOW_TIME: current date and time
# Please include name in "" and to not use blanks
# Default: "/full_backup_"$HOSTNAME"/"
BACKUP_SUBFOLDER="/full_backup_"$HOSTNAME"/"
# These are the options for rsync
# see the description of rsync for details
# Default: "-rvt --delete-after --modify-window=2"
# other example: "-arv --delete-after --modify-window=1"
# please note that the options must be included in ""
RSYNC_OPTIONS="-rvt --delete-after --modify-window=2"
# Here you can configure which folder should be synced
# Example: "/mnt/Web /mnt/Share"
# Please be careful with the syntax, it must be a full path
# and a blank must be used to separate the folders, and
# it must be included in ""
# Default: empty list (all shared folders will be backed up)
BACKUP_FOLDERS=""
# Here you can configure which folder should not be synced
# Example: "/mnt/Web /mnt/NExtAddons"
# Please be careful with the syntax, it must be a full path
# and a blank must be used to separate the folders, and
# it must be included in ""
# Default: empty list (no folder will be skipped)
Code: Select all
/etc/rc.d/usb_info.sh
Code: Select all
amsadmin# /etc/rc.d/usb_info.sh
expr: syntax error
BusyBox v1.00 (2008.01.14-12:28+0000) multi-call binary
Usage: head [OPTION]... [FILE]...
1+0 records in
1+0 records out
/dev/sdc:partitions=1:total=750.1GB
/dev/sdc1:filetype=Linux:total=390708MB:PORT1
Code: Select all
amsadmin# sh -x /etc/rc.d/usb_info.sh
+ ONLY_SHOW_ONE_PARTITION=0
+ HAVE_DISK=0
+ ls /proc/scsi
+ grep -v scsi\|sg\|sata_sil
+ LIST=usb-storage-0
usb-storage-1
usb-storage-2
usb-storage-3
+ echo usb-storage-0
+ cut -d- -f3
+ num=0
+ num=2
+ grep Attached /proc/scsi/usb-storage-0/2
+ cut -d: -f2
+ ATTACH= No
+ [ No = Yes ]
+ echo usb-storage-1
+ cut -d- -f3
+ num=1
+ num=3
+ grep Attached /proc/scsi/usb-storage-1/3
+ cut -d: -f2
+ ATTACH= Yes
+ [ Yes = Yes ]
+ [ 0 -eq 0 ]
+ grep Host /proc/scsi/usb-storage-1/3
+ tr :
+ cut -d -f5
+ cut -b5-
+ ScsiNum=3
+ grep scsi3 /proc/scsi/scsi
+ cut -b38
+ DiskTotalNum=0
+ grep Mount /proc/scsi/usb-storage-1/3
+ cut -d: -f2
+ cut -b4
+ StartDisk=c
+ num2=2
+ expr 2 + 0
+ num2=2
+ disk=sdc
+ grep ^T\|SerialNumber /proc/bus/usb/devices
+ grep -v Prnt=00\|bfffe0\|00:0e.3
+ grep Serial Number /proc/scsi/usb-storage-1/3
+ cut -d -f3
+ serial=5QD4WME0
+ echo 5QD4WME0
+ cut -b1-10
+ [ 5QD4WME0 = None -o 5QD4WME0 = NTXPRIVATE ]
+ grep -in SerialNumber=5QD4WME0 /tmp/storage.log
+ cut -d: -f1
+ serial_line=
+ expr - 1
expr: syntax error
+ t_line=
+ head -n /tmp/storage.log
BusyBox v1.00 (2008.01.14-12:28+0000) multi-call binary
Usage: head [OPTION]... [FILE]...
+ tail -n 1
+ sed -n s/ \{1,\}/+/pg
+ cut -d+ -f5
+ cut -b7
+ PORT=
+ disk=/dev/sdc
+ fdisk -l /dev/sdc
+ grep Disk
+ cut -b1-4
+ TEST=Disk
+ [ -n Disk ]
+ fdisk -l /dev/sdc
+ head -n 2
+ tail -n 1
+ cut -d: -f2
+ cut -d, -f1
+ cut -d -f2
+ capacity=750.1
+ fdisk -l /dev/sdc
+ head -n 2
+ tail -n 1
+ cut -d: -f2
+ cut -d, -f1
+ cut -d -f3
+ capacity_unit=GB
+ fdisk -l /dev/sdc
+ grep -c /dev/sdc
+ PARTS_NUM=2
+ PARTS_NUM=1
+ fdisk -l /dev/sdc
+ grep -v Win95 Ext\|Extended\|Linux extended
+ grep -c /dev/sdc
+ PARTS_NUM1=2
+ PARTS_NUM1=1
+ dd if=/dev/sdc of=/tmp/usb.mbr.3972 bs=512 count=1
1+0 records in
1+0 records out
+ grep -i press /tmp/usb.mbr.3972
+ [ 0 -eq 0 ]
+ echo /dev/sdc:partitions=1:total=750.1GB
/dev/sdc:partitions=1:total=750.1GB
+ x=1
+ [ 1 -le 1 ]
+ fdisk -l /dev/sdc
+ grep /dev/sdc
+ head -n 2
+ tail -n 1
+ cut -b1-9
+ DEV_PART=/dev/sdc1
+ fdisk -l /dev/sdc
+ grep /dev/sdc
+ head -n+ tail -n 1
2
+ cut -b54
+ GUESS_FS=3
+ fdisk -l /dev/sdc
+ grep /dev/sdc
+ head -n 2
+ tail -n 1
+ tr \n
+ tail -n 1
+ DEV_FS=Linux
+ fdisk -l /dev/sdc
+ grep /dev/sdc
+ head -n 2
+ tail -n 1
+ grep *
+ cut -d -f1
+ BOOT_MARK=
+ [ -n ]
+ BOOTABLE=0
+ [ 0 -eq 0 ]
+ fdisk -l /dev/sdc
+ grep /dev/sdc
+ head -n 2
+ tail -n 1
+ tr \n
+ grep -v ^$
+ head -n 4
+ tail -n 1
+ cut -d+ -f1
+ DEV_BLOCK=390708801
+ DEV_CAP=390708
+ echo /dev/sdc1
+ cut -b9
+ PART=1
+ echo /dev/sdc1:filetype=Linux:total=390708MB:PORT1
/dev/sdc1:filetype=Linux:total=390708MB:PORT1
+ x=2
+ [ 2 -le 1 ]
+ rm /tmp/usb.mbr.3972
+ echo usb-storage-2
+ cut -d- -f3
+ num=2
+ num=4
+ grep Attached /proc/scsi/usb-storage-2/4
+ cut -d: -f2
+ ATTACH= No
+ [ No = Yes ]
+ echo usb-storage-3
+ cut -d- -f3
+ num=3
+ num=5
+ grep Attached /proc/scsi/usb-storage-3/5
+ cut -d: -f2
+ ATTACH= No
+ [ No = Yes ]
derbermoe wrote:Das kann natürlich jetzt ein bisschen dauern, ich melde mich dann morgen abend nochmal
Code: Select all
# Alternatively, you can also set the destination to one folder
# by uncommenting and setting of the variables below
# Please be careful to set all three and to keep the syntax
#DESTDEVICE=/mnt/usbdisk3-1
#DESTTYPE=USB
#PORTNAME=PORT21
Code: Select all
# Alternatively, you can also set the destination to one folder
# by uncommenting and setting of the variables below
# Please be careful to set all three and to keep the syntax
DESTDEVICE=/mnt/usbdisk3-1
DESTTYPE=USB
PORTNAME=PORT1
Code: Select all
amsadmin# /etc/rc.d/usb_info.sh
1+0 records in
1+0 records out
/dev/sdb:partitions=1:total=400.0GB
/dev/sdb1:filetype=FAT32:total=390710MB:PORT01
Wie schön, dass Du noch hier bistderbermoe wrote:Alle Jahre wieder komm ich mit einer Frage um die Ecke...
Ich denke, da kommt es auf Groß- und Kleinschreibung an.derbermoe wrote:In der Konfig habe ich es auch mit Port01 statt Port1 probiert, ohne Erfolg.
Ja, er wird mit ext3 formatiert, soweit ich mich erinnere.derbermoe wrote:Außerdem habe ich da noch eine Frage zur Weboberfläche: Unter USB - Disk-Einstellung gibt es unter USB-Gerät1 einen Button namens Format. Was exakt passiert, wenn ich den drücke. Wird der über USB angeschlossene Datenträger dann formatiert? Mit welchem Dateisystem?
lochness wrote:Wie schön, dass Du noch hier bist...
lochness wrote:Aber, wie es gemountet ist, kannst Du ja mit "mount" nachsehen bzw. wenn Du nach /mnt wechselst.
Code: Select all
/dev/ram on / type ext2 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/sda1 on /mnt type ext3 (usrquota,grpquota)
Code: Select all
DESTDEVICE=/mnt/usbdisk1-1
DESTTYPE=USB
PORTNAME=PORT01
lochness wrote:Ja, er wird mit ext3 formatiert, soweit ich mich erinnere.
Code: Select all
amsadmin# mount
/dev/ram on / type ext2 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/sda1 on /mnt type ext3 (usrquota,grpquota)
/dev/sdb1 on /mnt/usbdisk3-1 type vfat (shortname=mixed,iocharset=utf8,umask=0)
Code: Select all
amsadmin# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
none /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/sda1 /mnt ext3 rw 0 0
/dev/sdb1 /mnt/usbdisk3-1 vfat rw 0 0
Code: Select all
amsadmin# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00 Mount:sda
Vendor: ATA Model: WDC WD10EACS-00D Rev: 01.0
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00 Mount:sdb
Vendor: USB Model: Flash Disk Rev: 5.00
Type: Direct-Access ANSI SCSI revision: 02
Code: Select all
amsadmin# /etc/rc.d/usb_info.sh
1+0 records in
1+0 records out
/dev/sdb:partitions=1:total=1059MB
/dev/sdb1:filetype=FAT16:total=1034MB:PORT21
lochness wrote:Hast Du es mal mit der Platte am anderen Rechner oder mit einer anderen Platte oder USB-Gerät am AMS probiert?
Code: Select all
fdisk /dev/sdb
Code: Select all
/dev/sda1 on /mnt type ext3 (usrquota,grpquota)
/dev/sdb1 on /mnt/usbdisk1-1 type vfat (shortname=mixed,iocharset=utf8,umask=0)
Users browsing this forum: No registered users and 1 guest