Giter VIP home page Giter VIP logo

outdoorbits / little-backup-box Goto Github PK

View Code? Open in Web Editor NEW
482.0 482.0 101.0 17.25 MB

This software turns a single-board computer into a versatile, pocket-sized backup solution. Especially for digital photography, this is the solution for backing up images and media files on mass storage devices when traveling or at events. Media content can be viewed and rated for the subsequent process.

Home Page: http://littlebackupbox.com

License: GNU General Public License v3.0

Shell 8.59% PHP 43.83% CSS 2.07% JavaScript 0.77% Python 44.75% HTML 0.01%
backup backup-device camera photography raspberry-pi

little-backup-box's People

Contributors

bakito avatar dmpop avatar dscottfrey avatar gadgetmies avatar jackub avatar kianmeng avatar munecito avatar outdoorbits avatar pnumekin avatar trevor61 avatar vinay0508 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

little-backup-box's Issues

camera-backup.sh doesn't copy over all photos taken in burst mode

If photos have been taken in burst mode then the files can have timestamps with the same hour, minute and second.

With the current file naming option:
gphoto2 --get-all-files --skip-existing --filename=%Y%m%d-%H%M%S.%C
only the first file taken in a particular second will be copied over. The others taken in the same second will be skipped because the name is already taken.

The --filename option takes the same time granularity as date(1) which only offers nanoseconds as a more accurate timestamp. If you don't want to use that then there might be no option but to include another source of uniqueness (maybe %f, the original filename without suffix, e.g. DSC_1234) as part of the target filename on storage medium.

Won't pass the files from the SD to the HDD

Hi
I tried to run the scripts and everything seems to be fine, the rPi ignores the exFAT mounting issue of the SD card and goes straight away into the script, however, it doesn't seem to complete the task, it just copies a file called Card ID inside a folder with a number (in my head that means it is recognising the card but doesn't copy any files whatsoever) any ideas on what could be?
I'm using an rPi 3 B and trying to move files from a 64Gb SD card to a USB stick with 128 Files are from SONY a6000
Thanks
UPDATE
There was an issue with the latest version of Raspbian missing some of the files in the image and that was cascading into all kinds of issues afterwards. I just managed to install the scripts and it all went perfectly fine. Thank you very much for this little project, it's immensely helpful.

Using UUID for bomb-proof mounting

I've had some issues in the past with SD cards and USB storage not always appearing with the same device ID (/dev/sda /devsdb etc/) which in turn prevents the backup from running.

Is there a possibility of using a list of known UUIDs to ensure that your disks mount in the correct place?

Little Backup Box Crashing rPi

Hi!

I bought a Raspberry pi b3+ just so I could try out and use little backup box for my photography.

I got the pi booting and running off of a WD Elements external HDD.

since i have installed LBB my pi has started crashing at random times maybe 1-5 minutes. This is without even trying to back anything up.

At one point i was testing its backup capabilities and it looks like it crashed before it was finished downloading the photos.

Here is the LBB log:

Shutdown scheduled for Thu 2018-05-24 16:32:13 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 16:35:21 UTC, use 'shutdown -c' to cancel.
Saving file as _MG_7959.CR2
Saving file as _MG_7959.JPG
Saving file as _MG_7960.CR2
Saving file as _MG_7960.JPG
Saving file as _MG_7961.CR2
Saving file as _MG_7961.JPG
Saving file as _MG_7962.CR2
Saving file as _MG_7962.JPG
Saving file as _MG_7963.CR2
Saving file as _MG_7963.JPG
Saving file as _MG_7964.CR2
Saving file as _MG_7964.JPG
Saving file as _MG_7965.CR2
Saving file as _MG_7965.JPG
Saving file as _MG_7966.CR2
Saving file as _MG_7966.JPG
Saving file as _MG_7967.CR2
Saving file as _MG_7967.JPG
Saving file as _MG_7968.CR2
Saving file as _MG_7968.JPG
Saving file as _MG_7969.CR2
Saving file as _MG_7969.JPG
Shutdown scheduled for Thu 2018-05-24 16:35:59 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 21:47:05 UTC, use 'shutdown -c' to cancel.
Skip existing file _MG_7959.CR2
Skip existing file _MG_7959.JPG
Skip existing file _MG_7960.CR2
Skip existing file _MG_7960.JPG
Skip existing file _MG_7961.CR2
Skip existing file _MG_7961.JPG
Skip existing file _MG_7962.CR2
Skip existing file _MG_7962.JPG
Skip existing file _MG_7963.CR2
Skip existing file _MG_7963.JPG
Skip existing file _MG_7964.CR2
Skip existing file _MG_7964.JPG
Skip existing file _MG_7965.CR2
Skip existing file _MG_7965.JPG
Skip existing file _MG_7966.CR2
Skip existing file _MG_7966.JPG
Skip existing file _MG_7967.CR2
Skip existing file _MG_7967.JPG
Skip existing file _MG_7968.CR2
Skip existing file _MG_7968.JPG
Skip existing file _MG_7969.CR2
Skip existing file _MG_7969.JPG
Shutdown scheduled for Thu 2018-05-24 21:50:14 UTC, use 'shutdown -c' to cancel.
Skip existing file _MG_7959.CR2
Skip existing file _MG_7959.JPG
Skip existing file _MG_7960.CR2
Skip existing file _MG_7960.JPG
Skip existing file _MG_7961.CR2
Skip existing file _MG_7961.JPG
Skip existing file _MG_7962.CR2
Skip existing file _MG_7962.JPG
Skip existing file _MG_7963.CR2
Skip existing file _MG_7963.JPG
Skip existing file _MG_7964.CR2
Skip existing file _MG_7964.JPG
Skip existing file _MG_7965.CR2
Skip existing file _MG_7965.JPG
Skip existing file _MG_7966.CR2
Skip existing file _MG_7966.JPG
Skip existing file _MG_7967.CR2
Skip existing file _MG_7967.JPG
Skip existing file _MG_7968.CR2
Skip existing file _MG_7968.JPG
Skip existing file _MG_7969.CR2
Skip existing file _MG_7969.JPG
Shutdown scheduled for Thu 2018-05-24 21:50:35 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 21:55:51 UTC, use 'shutdown -c' to cancel.

*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***

*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list [email protected], please run
gphoto2 as follows:

env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --get-all-files --skip-existing

Please make sure there is sufficient quoting around the arguments.

Shutdown scheduled for Thu 2018-05-24 22:00:42 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:00:42 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:05:58 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:05:58 UTC, use 'shutdown -c' to cancel.

*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***

*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list [email protected], please run
gphoto2 as follows:

env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --get-all-files --skip-existing

Please make sure there is sufficient quoting around the arguments.

Saving file as _MG_7959.CR2
Saving file as _MG_7959.JPG
Saving file as _MG_7960.CR2
Saving file as _MG_7960.JPG
Saving file as _MG_7961.CR2
Saving file as _MG_7961.JPG
Saving file as _MG_7962.CR2
Saving file as _MG_7962.JPG
Saving file as _MG_7963.CR2
Operation cancelled.

Cancelling...
Shutdown scheduled for Thu 2018-05-24 22:06:18 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:06:18 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:18:20 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:18:20 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:23:35 UTC, use 'shutdown -c' to cancel.
Shutdown scheduled for Thu 2018-05-24 22:23:35 UTC, use 'shutdown -c' to cancel.

FYI i haven't checked but I think the time on my pi is incorrect still. Also, this is all within maybe the last hour as I haven't tested it before now.

Thanks for the help!

enhancement? save smb.conf to .orig with timestamp

hi, like your project.
as i am testing and run the installscript multiple times on different maschines i thought it might be a good idea to save whatever smb.conf exists on the system to multiple .orig with timestamps. so nothing existing/other config gets lost through simple overwriting. what do you think?

https://github.com/dmpop/little-backup-box/blob/master/install-little-backup-box.sh#L110

# Configure Samba
#sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig-$(date +%Y%m%d%H%M)

rsync error at line 68 in card backup script

Hi, me again! So I am now running the little backup box in raspbian lite, it seems to work, no crashes and it transferred the first card just fine, but when I tried to transfer another card i got this error, and then when I tried to transfer the first card but with more images on it I got the same error:

/home/pi/little-backup-box/scripts/card-backup.sh: line 68[: 201805301529-30707.id: binary operator expected rsnc error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]

any help with this greatly appreciated.

RPi crashing after little backup box install

Hi, For some reason my issue was closed but not fixed. Heres what i get when i run dmesg in the terminal

pi@raspberrypi:~ $ dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.34-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1110 SMP Mon Apr 16 15:18:51 BST 2018
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 8 MiB at 0x3ac00000
[ 0.000000] On node 0 totalpages: 242688
[ 0.000000] free_area_init_node: node 0, pgdat 80c84e40, node_mem_map ba3a1000
[ 0.000000] Normal zone: 2133 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 242688 pages, LIFO batch:31
[ 0.000000] random: fast init done
[ 0.000000] percpu: Embedded 17 pages/cpu @ba34a000 s38720 r8192 d22720 u69632
[ 0.000000] pcpu-alloc: s38720 r8192 d22720 u69632 alloc=17*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 240555
[ 0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=9c328d51-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 940236K/970752K available (7168K kernel code, 575K rwdata, 2072K rodata, 1024K init, 706K bss, 22324K reserved, 8192K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xbb800000 - 0xff800000 (1088 MB)
lowmem : 0x80000000 - 0xbb400000 ( 948 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x80008000 - 0x80800000 (8160 kB)
.init : 0x80b00000 - 0x80c00000 (1024 kB)
.data : 0x80c00000 - 0x80c8fd4c ( 576 kB)
.bss : 0x80c96f4c - 0x80d478b4 ( 707 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 25231 entries in 74 pages
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[ 0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[ 0.000019] Switching to timer-based delay loop, resolution 52ns
[ 0.000269] Console: colour dummy device 80x30
[ 0.000288] console [tty1] enabled
[ 0.000312] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[ 0.000327] pid_max: default: 32768 minimum: 301
[ 0.000640] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000655] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.001587] Disabling memory control group subsystem
[ 0.001668] CPU: Testing write buffer coherency: ok
[ 0.002059] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002435] Setting up static identity map for 0x100000 - 0x10003c
[ 0.002553] Hierarchical SRCU implementation.
[ 0.003183] smp: Bringing up secondary CPUs ...
[ 0.003869] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.004617] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.005349] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.005453] smp: Brought up 1 node, 4 CPUs
[ 0.005463] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[ 0.005469] CPU: All CPU(s) started in HYP mode.
[ 0.005473] CPU: Virtualization extensions available.
[ 0.006326] devtmpfs: initialized
[ 0.016993] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[ 0.017215] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.017233] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.017790] pinctrl core: initialized pinctrl subsystem
[ 0.018530] NET: Registered protocol family 16
[ 0.021246] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[ 0.026048] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.026055] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.026265] Serial: AMBA PL011 UART driver
[ 0.027882] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[ 0.028341] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[ 0.059302] bcm2835-dma 3f007000.dma: DMA legacy API manager at bb813000, dmachans=0x1
[ 0.060818] SCSI subsystem initialized
[ 0.061039] usbcore: registered new interface driver usbfs
[ 0.061089] usbcore: registered new interface driver hub
[ 0.061173] usbcore: registered new device driver usb
[ 0.070087] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-04-16 18:16
[ 0.071481] clocksource: Switched to clocksource arch_sys_counter
[ 0.148862] VFS: Disk quotas dquot_6.6.0
[ 0.148948] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.149132] FS-Cache: Loaded
[ 0.149330] CacheFiles: Loaded
[ 0.158144] NET: Registered protocol family 2
[ 0.158863] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.158973] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.159158] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.159288] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.159332] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.159560] NET: Registered protocol family 1
[ 0.159992] RPC: Registered named UNIX socket transport module.
[ 0.159998] RPC: Registered udp transport module.
[ 0.160003] RPC: Registered tcp transport module.
[ 0.160008] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.161598] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[ 0.164324] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[ 0.172232] FS-Cache: Netfs 'nfs' registered for caching
[ 0.172821] NFS: Registering the id_resolver key type
[ 0.172851] Key type id_resolver registered
[ 0.172857] Key type id_legacy registered
[ 0.172872] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.174707] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.174830] io scheduler noop registered
[ 0.174837] io scheduler deadline registered (default)
[ 0.175115] io scheduler cfq registered
[ 0.175122] io scheduler mq-deadline registered
[ 0.175128] io scheduler kyber registered
[ 0.177412] BCM2708FB: allocated DMA memory fad00000
[ 0.177438] BCM2708FB: allocated DMA channel 0 @ bb813000
[ 0.227389] Console: switching to colour frame buffer device 228x61
[ 0.257622] bcm2835-rng 3f104000.rng: hwrng registered
[ 0.257750] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[ 0.258218] vc-sm: Videocore shared memory driver
[ 0.258486] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[ 0.268134] brd: module loaded
[ 0.277057] loop: module loaded
[ 0.277071] Loading iSCSI transport class v2.0-870.
[ 0.277743] libphy: Fixed MDIO Bus: probed
[ 0.277830] usbcore: registered new interface driver lan78xx
[ 0.277886] usbcore: registered new interface driver smsc95xx
[ 0.277901] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 0.503615] Core Release: 2.80a
[ 0.503626] Setting default values for core params
[ 0.503659] Finished setting default values for core params
[ 0.703908] Using Buffer DMA mode
[ 0.703915] Periodic Transfer Interrupt Enhancement - disabled
[ 0.703920] Multiprocessor Interrupt Enhancement - disabled
[ 0.703926] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 0.703943] Dedicated Tx FIFOs mode
[ 0.704363] WARN::dwc_otg_hcd_init:1046: FIQ DMA bounce buffers: virt = 0xbad14000 dma = 0xfad14000 len=9024
[ 0.704389] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
Interrupt/Control Split Transaction hack enabled
[ 0.704396] dwc_otg: Microframe scheduler enabled
[ 0.704453] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x805e6a40
[ 0.704464] WARN::hcd_init_fiq:460: FIQ ASM at 0x805e6da8 length 36
[ 0.704476] WARN::hcd_init_fiq:486: MPHI regs_base at 0xbb87e000
[ 0.704533] dwc_otg 3f980000.usb: DWC OTG Controller
[ 0.704567] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[ 0.704599] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[ 0.704647] Init: Port Power? op_state=1
[ 0.704652] Init: Power Port (0)
[ 0.704863] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.704875] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.704883] usb usb1: Product: DWC OTG Controller
[ 0.704891] usb usb1: Manufacturer: Linux 4.14.34-v7+ dwc_otg_hcd
[ 0.704900] usb usb1: SerialNumber: 3f980000.usb
[ 0.705503] hub 1-0:1.0: USB hub found
[ 0.705550] hub 1-0:1.0: 1 port detected
[ 0.706062] dwc_otg: FIQ enabled
[ 0.706067] dwc_otg: NAK holdoff enabled
[ 0.706072] dwc_otg: FIQ split-transaction FSM enabled
[ 0.706084] Module dwc_common_port init
[ 0.706300] usbcore: registered new interface driver usb-storage
[ 0.706470] mousedev: PS/2 mouse device common for all mice
[ 0.706546] IR NEC protocol handler initialized
[ 0.706551] IR RC5(x/sz) protocol handler initialized
[ 0.706558] IR RC6 protocol handler initialized
[ 0.706563] IR JVC protocol handler initialized
[ 0.706568] IR Sony protocol handler initialized
[ 0.706573] IR SANYO protocol handler initialized
[ 0.706578] IR Sharp protocol handler initialized
[ 0.706584] IR MCE Keyboard/mouse protocol handler initialized
[ 0.706589] IR XMP protocol handler initialized
[ 0.707269] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[ 0.707530] bcm2835-cpufreq: min=600000 max=1400000
[ 0.707879] sdhci: Secure Digital Host Controller Interface driver
[ 0.707883] sdhci: Copyright(c) Pierre Ossman
[ 0.708224] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[ 0.708536] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[ 0.708625] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.710039] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.710181] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.710361] usbcore: registered new interface driver usbhid
[ 0.710366] usbhid: USB HID core driver
[ 0.711002] vchiq: vchiq_init_state: slot_zero = bad80000, is_master = 0
[ 0.712514] [vc_sm_connected_init]: start
[ 0.722181] [vc_sm_connected_init]: end - returning 0
[ 0.722754] Initializing XFRM netlink socket
[ 0.722778] NET: Registered protocol family 17
[ 0.722881] Key type dns_resolver registered
[ 0.723423] Registering SWP/SWPB emulation handler
[ 0.724003] registered taskstats version 1
[ 0.729989] uart-pl011 3f201000.serial: cts_event_workaround enabled
[ 0.730068] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 0.732083] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[ 0.732093] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[ 0.802127] sdhost: log_buf @ bad13000 (fad13000)
[ 0.838326] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 0.839897] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 0.841485] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 0.844274] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 0.881503] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 0.882549] of_cfs_init
[ 0.882643] of_cfs_init: OK
[ 0.883250] Waiting for root device PARTUUID=9c328d51-02...
[ 0.928560] mmc1: new high speed SDIO card at address 0001
[ 0.931598] Indeed it is in host mode hprt0 = 00021501
[ 1.141578] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.141704] Indeed it is in host mode hprt0 = 00001101
[ 1.381750] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[ 1.381761] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.382307] hub 1-1:1.0: USB hub found
[ 1.382394] hub 1-1:1.0: 4 ports detected
[ 1.701509] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 1.831734] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514
[ 1.831745] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.832215] hub 1-1.1:1.0: USB hub found
[ 1.832301] hub 1-1.1:1.0: 3 ports detected
[ 2.151508] usb 1-1.1.2: new low-speed USB device number 4 using dwc_otg
[ 2.299429] usb 1-1.1.2: New USB device found, idVendor=046d, idProduct=c517
[ 2.299440] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.299448] usb 1-1.1.2: Product: USB Receiver
[ 2.299456] usb 1-1.1.2: Manufacturer: Logitech
[ 2.631508] usb 1-1.1.1: new high-speed USB device number 5 using dwc_otg
[ 2.761950] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[ 2.761962] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.921503] usb 1-1.3: new high-speed USB device number 6 using dwc_otg
[ 3.029703] libphy: lan78xx-mdiobus: probed
[ 3.053192] usb 1-1.3: New USB device found, idVendor=1058, idProduct=25a1
[ 3.053203] usb 1-1.3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 3.053212] usb 1-1.3: Product: Elements 25A1
[ 3.053220] usb 1-1.3: Manufacturer: Western Digital
[ 3.053228] usb 1-1.3: SerialNumber: 57584831413138483935594B
[ 3.053852] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 3.054388] scsi host0: usb-storage 1-1.3:1.0
[ 4.072416] scsi 0:0:0:0: Direct-Access WD Elements 25A1 1014 PQ: 0 ANSI: 6
[ 4.074616] sd 0:0:0:0: [sda] Spinning up disk...
[ 5.111508] .
[ 6.151509] .
[ 7.191507] .
[ 8.231508] .
[ 8.231700] ready
[ 8.231972] sd 0:0:0:0: [sda] 3906963456 512-byte logical blocks: (2.00 TB/1.82 TiB)
[ 8.232394] sd 0:0:0:0: [sda] Write Protect is off
[ 8.232407] sd 0:0:0:0: [sda] Mode Sense: 47 00 10 08
[ 8.232834] sd 0:0:0:0: [sda] No Caching mode page found
[ 8.233018] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 8.386892] sda: sda1 sda2
[ 8.388987] sd 0:0:0:0: [sda] Attached SCSI disk
[ 8.571171] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 8.571245] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
[ 8.594891] devtmpfs: mounted
[ 8.598033] Freeing unused kernel memory: 1024K
[ 9.407353] systemd[1]: System time before build time, advancing clock.
[ 9.638232] NET: Registered protocol family 10
[ 9.639613] Segment Routing with IPv6
[ 9.659117] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.741563] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[ 9.742118] systemd[1]: Detected architecture arm.
[ 9.754586] systemd[1]: Set hostname to .
[ 11.811853] systemd[1]: Listening on fsck to fsckd communication Socket.
[ 11.812987] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 11.813217] systemd[1]: Listening on udev Kernel Socket.
[ 11.850914] systemd[1]: Listening on udev Control Socket.
[ 11.851284] systemd[1]: Listening on Journal Socket.
[ 11.852170] systemd[1]: Created slice User and Session Slice.
[ 11.852388] systemd[1]: Listening on Journal Socket (/dev/log).
[ 11.926419] random: crng init done
[ 12.082869] i2c /dev entries driver
[ 20.361268] EXT4-fs (sda2): re-mounted. Opts: (null)
[ 20.452444] systemd-journald[97]: Received request to flush runtime journal from PID 1
[ 21.353644] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 21.357597] bcm2835_alsa bcm2835_alsa: card created with 8 channels
[ 21.642416] input: Logitech USB Receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:046D:C517.0001/input/input0
[ 21.675784] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 21.712454] logitech 0003:046D:C517.0001: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-3f980000.usb-1.1.2/input0
[ 21.712613] logitech 0003:046D:C517.0002: fixing up Logitech keyboard report descriptor
[ 21.716757] input: Logitech USB Receiver as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.1/0003:046D:C517.0002/input/input1
[ 21.748204] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 21.755293] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006
[ 21.755946] usbcore: registered new interface driver brcmfmac
[ 21.782479] logitech 0003:046D:C517.0002: input,hiddev96,hidraw1: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-3f980000.usb-1.1.2/input1
[ 22.233322] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04
[ 22.233878] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 9.10.105 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-03-09 18:56:28
[ 25.081409] uart-pl011 3f201000.serial: no DMA platform data
[ 26.696678] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 26.696698] brcmfmac: power management disabled
[ 27.243853] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 28.018488] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k FS
[ 32.542282] Bluetooth: Core ver 2.22
[ 32.542481] NET: Registered protocol family 31
[ 32.542488] Bluetooth: HCI device and connection manager initialized
[ 32.542515] Bluetooth: HCI socket layer initialized
[ 32.542529] Bluetooth: L2CAP socket layer initialized
[ 32.542561] Bluetooth: SCO socket layer initialized
[ 32.594675] Bluetooth: HCI UART driver ver 2.3
[ 32.594683] Bluetooth: HCI UART protocol H4 registered
[ 32.594685] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 32.594798] Bluetooth: HCI UART protocol Broadcom registered
[ 33.070363] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 33.070370] Bluetooth: BNEP filters: protocol multicast
[ 33.070385] Bluetooth: BNEP socket layer initialized
[ 33.202212] Bluetooth: RFCOMM TTY layer initialized
[ 33.202239] Bluetooth: RFCOMM socket layer initialized
[ 33.202259] Bluetooth: RFCOMM ver 1.11
[ 33.366127] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 35.525095] fuse init (API version 7.26)

Getting going

I ran the script on my Pi and it seems to not be working. The read light will blink on my card reader and then after a period of time, the Pi shuts down. Im using a Canon 5D Mark 3 CF card and either a USB 128gb stick or Seagate 4tb drive. Is there any way to have the process run in a terminal window or something to see what the current task is that is running to determine the failing point? Im not really well versed in the entire Raspberry Pi eco system so I may be missing something completely but It would be nice to see what is going on and if I can fix this. Running Raspian NOOBs on the Pi

Not unique media id

Hello.
I came on an issue with identical media ids yesterday when i tried to prepare 3 sd cards in a row.

Preparing for a trip i wanted to prepare the (empty, freshly formated by camera) sd cards and the backup usb stick. I followed the usual way - power up Pi, insert usb backup medium, insert sd card (with usb card reader), wait for shutdown (some 30 seconds). Repeat 3 times in about 3-5 minutes.

When checking the usb stick on another machine i found only 2 backup folders. I checked the sd cards as well and found 2 with identical id file name.

I solved the problem by deleting one card's id file and repeating the setup, about 10 minutes after the first try. I ended OK with a new id there.

I think it may be a problem when preparing more than one media in short time, on a Pi without correct system time (headless Pi zero in my case, no network connection).

This may lead to loss of data when backing up 2 different cards with identical id onto the same backup medium.

My cards where of 2 different types, the identical ids were on the cards of the same type - any issue there (i did not study the script)?

I just updated little-backup-box to the actual version (as headless backup device) after using the old version for about 8 or 10 months. I did not have any trouble there, maybe because it used random id number or i did not prepare multiple cards in a row.

Maybe you should revert to the old system, or (since a date-time based system has some advantages for book-keeping) to a combined system.

As for your work - i really like your little helpers and your ebook - highly recommended!

Greets
Andreas

Enable/disable on demand

I am new to this so please forgive me if I am asking simple questions. I will be using my Raspberry Pi with little-backup-box to automatically copy my pictures to a storage device without a monitor/keyboard, but I would also like to use it on other occasions for other purposes. Is there any way to disable the scripts so that they will not run until such time as I know that I am going on a trip and then enable them before the start of the trip...and again disable them when I get back?

Image viewer file support

I mainly take photos in raw, how would I be able to view them using the image viewer, I added the file type to the format array, but it only shows the missing image icon. Is there a way to add support for the different images.

Process complete?

Hi I dont know if this is the correct place to ask.
I was looking for a script for raspberry like little-backup. But its lacking some features to fully trust it on the go

Is it possible you can add?

  • A LED(s) or a smal Oled screen to show the file transfer i % until its done
  • Set the Pi in Wifi AP (Access point) for easy control of the device from a android device. For checking what is connected, check the file transfer progress and maybe access the media on the drive.

I dont know if you have time for this but is just a thought

can't get it to work

I am new to Raspberry pi.
I set this up on RPi W with Zero4U hub (OS: Raspbian Jessie Lite.)
it boots & stuck on login prompt.
I tried inserting usb stick, and memory card. Nothing was written.
how to diagnose?
how can I disable little-backup-box upon startup?
thanx

Monitor and restart rc.py

#!/bin/bash
while :
do
  if [[ ! $(pgrep -f rc.py) ]]; then
    cd /home/pi/little-backup-box/rc/
    python3 rc.py
  fi
done

3d print case - display support?

is there any information for the case you showed on the readme.md?
stl-files?
is the display in the case supported by the scripts?

thanks for reply,
ozett

Wifi file sharing - not an issue but I'd like help

Hey, do you guys think that there is a way to modify this program so that you could also stream files stored on the backup memory device to computers and phones? I'm a massive noob when it comes to linux programming, i really need to take the time to learn it. If anyone could help figure this out it would be much appreciated.

Was working, then just stopped

Raspi Zero W, w/ stacking USB hat from makerbot. MicroSD card reader and sandisk USB 3 flash drive.

For a while backups were fine, then it just stopped working. I followed the directions and inserted the destination first (sandisk) then the reader. It just flashes and nothing ever happens. The card ID was written to the flash drive, but nothing else. (the flash drive only illuminates activity when I first put it in, then fails to again) If I pull the sandisk drive, the pi shuts down. Is there a certain amount of time I need to wait for the pi to book? Usually I give it about a minute, does it need more?

Without feedback of any sort, it's really difficult to know what's going on with the script, such as when the pi has completed the boot sequence for example. I saw another request for some kind of board LED status light, and I think that would be helpful.

Just to provide some more information. Both the storage device and card are seen by the Pi.
/dev/sda1 60G 2.6G 58G 5% /media/storage
/dev/sdb1 60G 2.2G 58G 4% /media/card

Also is there any uninstall method for this? I would have tried uninstalling and re-installing the scripts but I'm not sure how to completely remove it.

Installer error check

Check whether all the required packages have been installed before continuing the installation.

when both card reader and usb drive are plugged in, the pi shuts down in 5 seconds

Hi
I followed the instructions in your book and setup the RPi3.
When I connect the USB backup device (WD passport) the led blinks slowly. When I connect the card reader with the card in it, the leds start blinking for few seconds (3-5 seconds) then the Pi shuts down.
It only created the CARD_ID folder and nothing else.
What can be the issue?
Should I use a certain type of card reader? or backup storage USB device?
Regards

network Sync

Hi
is there a way to config the box to sync the files to my nas ?
it can smb, nextcloud and syncthing

Leds control on other boards

Would you mind adding some config to use another boards leds?
For Orange Pi you can use sudo sh -c "echo heartbeat > /sys/class/leds/red_led/trigger"
or
sudo sh -c "echo heartbeat > /sys/class/leds/green_led/trigger"

I've checked your code against it - everything works if you change the path.

Thanks!

Empty card

Neither the ebook or this repo has information about how to properly empty the cards after backup. I guess formatting it from the camera would also delete the unique ID file. And the script does not delete files, iirc.

Any advice on a workflow?

Dual Drive Backup

I'm going travelling in less than a month, and I'd hate to lose the videos and images I'll be taking, but I'm sure it all won't fit on my cameras SD card. Just backing up to one drive is risky, in case something happens to that drive. So, I'd like to plug in 2 portable harddrives, then the sd card, and have it automatically mirror it to BOTH drives.

I have only a minor understanding of linux command line scripting, though I'll take a look myself at modifying it, but I was wondering how hard it would be to make this change. I'm assuming just mounting another drive and making an additional copy command to that drive as well?

Thank you!

Do file systems affect functionality?

I am using an sd card through a card reader and fat32 formatted usb stick, but not having any luck getting this to work. I have checked the SDA assignments and it seems the USB card is always mounted as SDA1 but the SD card is mounted as either SDC1 or SDD1, which of course renders the code inoperable. I've tested this a lot and getting the same problems.

Any help greatly appreciated, I really want to get this up and running!

Not sure what i am doing wrong.

Hello,
I'm kind of new to using a raspberry pi. I saw your program and thought it would be a great addition to my workflow, But somehow i screwed it up setting it up. I have installed the script and rebooted the pi, and have connected a drive and the card reader but it does not seem to be working. Any help with this would be greatly appreciated.

Unable to get this working

I'm trying to set this up on the Rpi Zero W with the Zero4u 4usb hub attached.
I've installed raspbian, updated it and then ran the curl command. When I power up the Pi the green light starts the 'heartbeat' pulse, and then switches to the slow blinking when I plug in the storage device (samsung 32gb fit usb 3.0). But when I plug in the SD card (Lexar® Professional 1000x SDHC™/SDXC™ UHS-II ) via an Anker multi-in-1 card reader the light pattern doesn't change and no files get transferred.

Any advice on what's not working?

Thank you

Combine mode detection depending on attached device

Hi Dmitri,

I've been following your latest changes and the remote control mode looks very promising. I'm planning to build a backup device similar to yours with a Pi Zero but without the USB hub and no WiFi or Bluetooth connection. While on the go I would want to backup to the internal SD card of the Pi and then when I'm home connect an external mSATA drive and backup from the internal SD card to the external storage.

With the remote control mode this is possible, but it requires connecting to the Pi first. It would be really nice if it was possible to do this automatically. In order to detect whether a connected device is a backup source (SD card, camera) or a backup destination (internal SD card, external storage) you could check for the device name, a file similar to the .id file or even the drive size.

For example my camera cards are all <= 128GB but my external drive is 256GB big. The backup box could then automatically backup from smaller drives than 128GB and backup to external drives which are bigger than 128GB. Of course this doesn't always work but then you could simply add a .backup file to your backup drive and the Pi assumes everything is a backup source unless there's a .backup file on the drive.

Let me know what you think!

backup box isn't starting

I just installed the image fresh updated on my Raspberry Pi 3B and installed the script sucessfully.

But it didnt start.
The log just says Shutdown scheduled for Mon 2018-04-23 00:46:45 CEST, use 'shutdown -c' to cancel.

i am using an ssd exFAT formated and an SD Card in an Cardreader

no connection can be established - Wifi / LAN

Hi, after installing the latest version of raspbian lite and the newest from LBB, after the setup, no connection can be establisehd to the RBP 4.

Wifi doesn't show up and over LAN I also cannot find any IP.

Any suggestion what to try, where to bugfix?

Large SD cards not being copied

I was unable to initiate a copy any of my large exFAT cards. Smaller 16GB cards formatted as FAT32 were no problem, but the 256GB SD cards from my Fuji X-T4 camera and 128GB micro SD cards from my DJI Mavic were ignored and a copy was never initiated. I tried two different USB 3.0 card readers I but no success (both readers and cards were test-read in Windows 10 with no issues). This is strange as the pi is able to see and read the contents of the larger cards via the folders on the pi desktop. The idea behind this project is brilliant, btw. =)))

As an aside, the external drive used was a USB 3.0 1TB WD My Passport formatted in NTFS - no issues with drive, just the larger cards.

SSH connection not possible after everything is installed

Hardware:
Rasberry Pi 2 Model B V1.1

OS:
RASPBIAN STRETCH WITH DESKTOP
Version:April 2018
Release date:2018-04-18
Kernel version:4.14

So I installed the OS on a microSD card, started an SSH connection (over LAN and later over a Wifi-Dongle), updated everything and finally installed the little-backup-box.
I chose the "card backup"-function and tested it. Everything works fine.

But now I am not able to make a new SSH connection. I am on the login console and if I am writing a wrong password, it just says access denied and I can try again. But if I write the right password, i get the following message:

"server unexpectedly closed network connection"

Is this because of the function to backup? It dosn't allow anything other than a card reader or a usb device?
Is it maybe possible to not let it shutdown after 5 minutes of not detecting any sorce and destination drive? So that after 5 minutes the backup function just exits and the raspi works like without the "little-backup-box"? If not then I have to reformat the sd card with a fresh OS to be able to update new functions or install something else?

(Please note that I am a total beginner Linux and Raspi, so maybe I am missing something or don't understand some functionalities right)

Can't copy second card

Hi,

Is it possible to copy a second card? I disabled the shutdown option to copy more than one cards. But the heartbeat stops and the script doesn't recognize the new card.

What can I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.