Initial commit 🚀
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.directory
|
||||
53
README.md
Normal file
53
README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# Little Backup Box
|
||||
|
||||
Bash shell scripts that transform a Raspberry Pi (or any single-board computer running a Debian-based Linux distribution) into an inexpensive, fully-automatic, pocketable photo backup and streaming device.
|
||||
|
||||
<img src="http://i.imgur.com/xrpfK9h.jpg" alt="" width="375"/>
|
||||
|
||||
## Installation
|
||||
|
||||
Install Git and screen:
|
||||
|
||||
sudo apt install git-core screen
|
||||
|
||||
Clone the Little Backup Box Git repository on your Raspberry Pi:
|
||||
|
||||
git clone https://gitlab.com/dmpop/little-backup-box.git
|
||||
|
||||
Switch to the *little-backup-box* directory and make the *install-little-backup-box.sh* script executable:
|
||||
|
||||
```
|
||||
cd little-backup-box
|
||||
chmod +x install-little-backup-box.sh
|
||||
```
|
||||
|
||||
Run the installer script:
|
||||
|
||||
./install-little-backup-box.sh
|
||||
|
||||
## Usage
|
||||
|
||||
1. Boot the Raspberry Pi
|
||||
2. Plug in the backup storage device
|
||||
3. Plug in the card reader and wait till the Raspberry Pi shuts down
|
||||
|
||||
**Note:** To differentiate between different storage cards, the backup script assigns a random 8-digit identifying number to each card (this number is stored in the *CARD_ID* file in the root of the card). The contents of the card is saved on the storage device in a folder with the identifying number as its name.
|
||||
|
||||
# Problems?
|
||||
|
||||
Please report bugs and issues in the [Issues](https://gitlab.com/dmpop/little-backup-box/issues) section.
|
||||
|
||||
## Linux Photography
|
||||
|
||||
Little Backup Box is a part of a streamlined and automated Linux-based photographic workflow described in the [Linux Photography](https://gumroad.com/l/linux-photography) book. The book provides step-by-step instructions on building a Raspberry Pi-based photo backup device running the Little Backup Box script. Get your copy at [Gumroad](https://gumroad.com/l/linux-photography).
|
||||
|
||||
<img src="https://scribblesandsnaps.files.wordpress.com/2016/07/linux-photography-6.jpg" width="200"/>
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
Dmitri Popov [dmpop@linux.com](mailto:dmpop@linux.com)
|
||||
|
||||
## License
|
||||
|
||||
The [GNU General Public License version 3](http://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||
59
backup.sh
Executable file
59
backup.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# IMPORTANT:
|
||||
# Run the install-little-backup-box.sh script first
|
||||
# to install the required packages and configure the system.
|
||||
|
||||
# Specify devices and their mount points
|
||||
STORAGE_DEV="sda1"
|
||||
STORAGE_MOUNT_POINT="/media/storage"
|
||||
CARD_DEV="sdb1"
|
||||
CARD_MOUNT_POINT="/media/card"
|
||||
|
||||
# Set the ACT LED to heartbeat
|
||||
sudo sh -c "echo heartbeat > /sys/class/leds/led0/trigger"
|
||||
|
||||
# Wait for a USB storage device (e.g., a USB flash drive)
|
||||
STORAGE=$(ls /dev/* | grep $STORAGE_DEV | cut -d"/" -f3)
|
||||
while [ -z ${STORAGE} ]
|
||||
do
|
||||
sleep 1
|
||||
STORAGE=$(ls /dev/* | grep $STORAGE_DEV | cut -d"/" -f3)
|
||||
done
|
||||
|
||||
# When the USB storage device is detected, mount it
|
||||
mount /dev/$STORAGE_DEV $STORAGE_MOUNT_POINT
|
||||
|
||||
# Set the ACT LED to blink at 1000ms to indicate that the storage device has been mounted
|
||||
sudo sh -c "echo timer > /sys/class/leds/led0/trigger"
|
||||
sudo sh -c "echo 1000 > /sys/class/leds/led0/delay_on"
|
||||
|
||||
# Wait for a card reader or a camera
|
||||
CARD_READER=$(ls /dev/* | grep $CARD_DEV | cut -d"/" -f3)
|
||||
until [ ! -z $CARD_READER ]
|
||||
do
|
||||
sleep 1
|
||||
CARD_READER=$(ls /dev/sd* | grep $CARD_DEV | cut -d"/" -f3)
|
||||
done
|
||||
|
||||
# If the card reader is detected, mount it and obtain its UUID
|
||||
if [ ! -z $CARD_READER ]; then
|
||||
mount /dev/$CARD_DEV $CARD_MOUNT_POINT
|
||||
# # Set the ACT LED to blink at 500ms to indicate that the card has been mounted
|
||||
sudo sh -c "echo 500 > /sys/class/leds/led0/delay_on"
|
||||
# Create the CARD_ID file containing a random 8-digit identifier if doesn't exist
|
||||
if [ ! -f $CARD_MOUNT_POINT/CARD_ID ]; then
|
||||
< /dev/urandom tr -cd 0-9 | head -c 8 > $CARD_MOUNT_POINT/CARD_ID
|
||||
fi
|
||||
# Read the 8-digit identifier number from the CARD_ID file on the card
|
||||
# and use it as a directory name in the backup path
|
||||
read -r ID < $CARD_MOUNT_POINT/CARD_ID
|
||||
BACKUP_PATH=$STORAGE_MOUNT_POINT/"$ID"
|
||||
# Perform backup using rsync
|
||||
rsync -avh $CARD_MOUNT_POINT/ $BACKUP_PATH
|
||||
# Turn off the ACT LED to indicate that the backup is completed
|
||||
sudo sh -c "echo 0 > /sys/class/leds/led0/brightness"
|
||||
fi
|
||||
# Shutdown
|
||||
sync
|
||||
shutdown -h now
|
||||
47
gphoto-backup.sh
Normal file
47
gphoto-backup.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Specify a storage device and its mount point
|
||||
STORAGE_DEV="sda1"
|
||||
STORAGE_MOUNT_POINT="/media/storage"
|
||||
|
||||
# Set the ACT LED to heartbeat
|
||||
sudo sh -c "echo heartbeat > /sys/class/leds/led0/trigger"
|
||||
|
||||
# Wait for a USB storage device (e.g., a USB flash drive)
|
||||
STORAGE=$(ls /dev/* | grep $STORAGE_DEV | cut -d"/" -f3)
|
||||
while [ -z ${STORAGE} ]
|
||||
do
|
||||
sleep 1
|
||||
STORAGE=$(ls /dev/* | grep $STORAGE_DEV | cut -d"/" -f3)
|
||||
done
|
||||
|
||||
# When the USB storage device is detected, mount it
|
||||
mount /dev/$STORAGE_DEV $STORAGE_MOUNT_POINT
|
||||
|
||||
# Set the ACT LED to blink at 1000ms to indicate that the storage device has been mounted
|
||||
sudo sh -c "echo timer > /sys/class/leds/led0/trigger"
|
||||
sudo sh -c "echo 1000 > /sys/class/leds/led0/delay_on"
|
||||
|
||||
# Wait for camera
|
||||
DEVICE=$(gphoto2 --auto-detect | grep usb | cut -b 36-42 | sed 's/,/\//')
|
||||
while [ -z ${DEVICE} ]
|
||||
do
|
||||
sleep 1
|
||||
DEVICE=$(gphoto2 --auto-detect | grep usb | cut -b 36-42 | sed 's/,/\//')
|
||||
done
|
||||
|
||||
# Set the ACT LED to blink at 500ms to indicate that the camera has been detected
|
||||
sudo sh -c "echo 500 > /sys/class/leds/led0/delay_on"
|
||||
|
||||
# Switch to STORAGE_MOUNT_POINT and create a directory with current date as its name
|
||||
cd $STORAGE_MOUNT_POINT
|
||||
mkdir "`date --iso-8601`" && cd $_
|
||||
# Transfer new files to the USB storage device
|
||||
#gphoto2 --get-all-files
|
||||
gphoto2 --new
|
||||
# Rename files using ExifTool based on EXIF date and time data
|
||||
exiftool -r -d %Y%m%d-%H%M%S.%%e "-FileName<DateTimeOriginal" .
|
||||
# Turn off the ACT LED to indicate that the backup is completed
|
||||
sudo sh -c "echo 0 > /sys/class/leds/led0/brightness"
|
||||
# Shutdown
|
||||
shutdown -h now
|
||||
229
ichigo.svg
Normal file
229
ichigo.svg
Normal file
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 83.28714 89.003151"
|
||||
enable-background="new 0 0 100 100"
|
||||
xml:space="preserve"
|
||||
id="svg2"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="ichigo.svg"
|
||||
width="83.28714"
|
||||
height="89.003151"
|
||||
inkscape:export-filename="/home/dmpop/ichigo.png"
|
||||
inkscape:export-xdpi="96.190002"
|
||||
inkscape:export-ydpi="96.190002"><metadata
|
||||
id="metadata102"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs100" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1375"
|
||||
inkscape:window-height="876"
|
||||
id="namedview98"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="1.888"
|
||||
inkscape:cx="41.642749"
|
||||
inkscape:cy="32.001001"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2" /><g
|
||||
id="g4"
|
||||
style="fill:#ff0000"
|
||||
transform="translate(-8.3572506,-5.4978477)"><path
|
||||
d="m 89.678,23.383 c 0.839,0.229 1.691,-0.273 1.913,-1.107 0.223,-0.834 -0.273,-1.691 -1.107,-1.913 -9.077,-2.421 -16.374,-0.292 -21.772,6.298 0.318,-4.744 0.052,-9.658 -1.913,-13.87 -0.22,-0.471 -0.659,-0.803 -1.173,-0.883 -0.51,-0.08 -1.034,0.099 -1.388,0.479 -1.983,2.132 -3.446,4.95 -4.311,8.089 C 58.134,15.813 56.835,11.28 56.003,6.776 55.882,6.125 55.364,5.62 54.71,5.517 54.057,5.414 53.406,5.733 53.092,6.316 c -2.19,4.042 -2.497,7.907 -1.833,11.703 -4.53,-2.437 -8.717,-3.654 -12.606,-3.654 -9.42,0 -15.805,6.971 -21.301,14.503 -10.326,14.152 -11.764,54.006 -4.3,61.47 3.621,3.622 13.665,4.163 19.33,4.163 14.581,0 33.675,-3.342 41.958,-9.729 5.704,-4.398 12.325,-10.604 12.906,-19.638 0.294,-4.562 -0.965,-9.455 -3.784,-14.742 1.567,0.699 3.177,1.135 4.803,1.135 0.629,0 1.25,-0.065 1.848,-0.196 0.438,-0.097 0.813,-0.376 1.032,-0.768 0.218,-0.392 0.258,-0.859 0.108,-1.282 -1.612,-4.557 -5.162,-8.104 -10.118,-10.3 2.85,-1.879 5.729,-4.845 8.888,-9.087 0.311,-0.417 0.394,-0.959 0.222,-1.449 -0.171,-0.491 -0.574,-0.863 -1.076,-0.996 -2.496,-0.659 -4.812,-0.979 -7.077,-0.979 -3.973,0 -7.695,0.994 -11.749,3.176 4.701,-6.417 11.057,-8.468 19.335,-6.263 z m -24.775,-6.71 c 0.852,3.078 1.004,6.864 0.503,11.893 -1.084,-1.001 -2.153,-1.955 -3.204,-2.849 0.206,-3.333 1.164,-6.531 2.701,-9.044 z M 54.182,12.915 c 0.763,2.883 1.715,5.792 2.854,8.746 C 56.35,21.169 55.671,20.701 55,20.26 54.259,17.789 53.887,15.361 54.182,12.915 Z m 29.944,52.021 c -0.498,7.736 -6.191,13.118 -11.695,17.362 -7.647,5.896 -26.343,9.078 -40.05,9.078 -10.228,0 -15.55,-1.678 -17.12,-3.247 -5.808,-5.808 -5.33,-43.785 4.616,-57.417 5.79,-7.935 11.198,-13.22 18.775,-13.22 7.677,0 16.917,5.509 28.248,16.84 12.135,12.134 17.77,22.146 17.226,30.604 z m 3.282,-16.591 c -2.545,-0.335 -5.259,-2.082 -7.779,-4.056 -0.788,-1.101 -1.632,-2.217 -2.543,-3.353 0.066,-0.02 0.133,-0.04 0.2,-0.061 4.675,1.435 8.196,4.019 10.122,7.47 z M 82.09,29.598 c 1.277,0 2.579,0.118 3.938,0.357 -3.221,4.014 -6.067,6.47 -8.894,7.635 -1.119,-0.296 -2.287,-0.535 -3.502,-0.714 -0.729,-0.81 -1.489,-1.629 -2.277,-2.456 l -0.87,-1.262 c 4.159,-2.485 7.7,-3.56 11.605,-3.56 z"
|
||||
id="path6"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 39.336,41.333 -0.565,0.972 c -0.434,0.747 -0.181,1.703 0.566,2.137 0.247,0.144 0.518,0.211 0.784,0.211 0.539,0 1.063,-0.278 1.353,-0.777 l 0.565,-0.972 c 0.434,-0.747 0.181,-1.703 -0.566,-2.137 -0.746,-0.434 -1.703,-0.18 -2.137,0.566 z"
|
||||
id="path8"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 19.845,40.694 c 0.113,0.025 0.226,0.037 0.337,0.037 0.718,0 1.365,-0.498 1.525,-1.228 l 0.507,-2.312 c 0.186,-0.843 -0.348,-1.677 -1.191,-1.861 -0.841,-0.186 -1.677,0.347 -1.862,1.191 l -0.507,2.312 c -0.186,0.842 0.348,1.676 1.191,1.861 z"
|
||||
id="path10"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 55.102,31.817 c 0.192,0.077 0.39,0.114 0.585,0.114 0.618,0 1.204,-0.37 1.45,-0.979 l 0.605,-1.5 c 0.322,-0.801 -0.064,-1.712 -0.865,-2.035 -0.801,-0.324 -1.711,0.064 -2.034,0.864 l -0.605,1.5 c -0.324,0.802 0.064,1.713 0.864,2.036 z"
|
||||
id="path12"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 64.548,37.412 -0.751,0.736 c -0.616,0.604 -0.626,1.594 -0.021,2.21 0.306,0.313 0.711,0.469 1.116,0.469 0.395,0 0.79,-0.148 1.094,-0.447 l 0.751,-0.736 c 0.616,-0.604 0.626,-1.594 0.021,-2.21 -0.604,-0.618 -1.595,-0.627 -2.21,-0.022 z"
|
||||
id="path14"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 48.923,44.316 c 0.306,0.311 0.709,0.467 1.113,0.467 0.396,0 0.792,-0.149 1.097,-0.449 l 0.93,-0.916 c 0.615,-0.605 0.623,-1.595 0.018,-2.21 -0.605,-0.615 -1.596,-0.623 -2.211,-0.017 l -0.93,0.916 c -0.615,0.604 -0.623,1.595 -0.017,2.209 z"
|
||||
id="path16"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 28.877,42.37 -1.288,1.272 c -0.614,0.606 -0.62,1.596 -0.013,2.21 0.305,0.309 0.708,0.464 1.111,0.464 0.397,0 0.794,-0.15 1.099,-0.452 l 1.287,-1.272 c 0.614,-0.606 0.62,-1.596 0.013,-2.209 -0.604,-0.614 -1.595,-0.62 -2.209,-0.013 z"
|
||||
id="path18"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 19.101,50.073 c 0.133,0.035 0.268,0.052 0.399,0.052 0.693,0 1.326,-0.464 1.511,-1.165 l 0.507,-1.923 c 0.22,-0.835 -0.278,-1.69 -1.113,-1.91 -0.837,-0.22 -1.69,0.278 -1.91,1.113 l -0.507,1.923 c -0.22,0.835 0.278,1.69 1.113,1.91 z"
|
||||
id="path20"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 24.745,57.541 c 0.236,0.127 0.49,0.188 0.741,0.188 0.556,0 1.094,-0.297 1.377,-0.82 l 0.897,-1.662 c 0.41,-0.76 0.126,-1.707 -0.633,-2.118 -0.76,-0.408 -1.708,-0.126 -2.118,0.634 l -0.897,1.662 c -0.41,0.758 -0.127,1.706 0.633,2.116 z"
|
||||
id="path22"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 49.346,51.083 c -0.679,-0.532 -1.663,-0.413 -2.194,0.268 l -1.353,1.728 c -0.532,0.679 -0.413,1.662 0.267,2.193 0.286,0.225 0.625,0.333 0.963,0.333 0.464,0 0.923,-0.206 1.231,-0.6 l 1.353,-1.728 c 0.532,-0.678 0.412,-1.662 -0.267,-2.194 z"
|
||||
id="path24"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 41.778,65.897 0.849,-1.712 c 0.384,-0.772 0.067,-1.71 -0.706,-2.094 -0.773,-0.385 -1.71,-0.067 -2.094,0.706 l -0.849,1.711 c -0.384,0.773 -0.067,1.711 0.706,2.095 0.223,0.111 0.459,0.163 0.693,0.163 0.575,10e-4 1.128,-0.319 1.401,-0.869 z"
|
||||
id="path26"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 32.344,66.587 1.563,-2.246 c 0.493,-0.709 0.318,-1.683 -0.391,-2.176 -0.709,-0.494 -1.683,-0.317 -2.175,0.391 l -1.563,2.246 c -0.493,0.709 -0.318,1.683 0.391,2.176 0.272,0.189 0.583,0.28 0.891,0.28 0.495,0 0.981,-0.235 1.284,-0.671 z"
|
||||
id="path28"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 16.133,62.685 c 0.035,0.003 0.07,0.004 0.104,0.004 0.816,0 1.504,-0.634 1.558,-1.46 l 0.118,-1.793 C 17.97,58.575 17.317,57.83 16.456,57.774 15.59,57.698 14.85,58.369 14.794,59.23 l -0.118,1.793 c -0.056,0.861 0.596,1.606 1.457,1.662 z"
|
||||
id="path30"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 16.853,73.331 -0.012,-2.312 c -0.004,-0.861 -0.704,-1.555 -1.563,-1.555 -0.003,0 -0.006,0 -0.008,0 -0.864,0.004 -1.56,0.707 -1.555,1.57 l 0.012,2.312 c 0.004,0.861 0.704,1.556 1.563,1.556 0.003,0 0.006,0 0.008,0 0.864,-0.005 1.559,-0.708 1.555,-1.571 z"
|
||||
id="path32"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 21.743,65.777 -0.963,2.378 c -0.324,0.8 0.063,1.712 0.862,2.036 0.192,0.077 0.391,0.114 0.586,0.114 0.618,0 1.203,-0.369 1.449,-0.977 L 24.64,66.95 c 0.324,-0.8 -0.063,-1.712 -0.862,-2.036 -0.801,-0.321 -1.711,0.064 -2.035,0.863 z"
|
||||
id="path34"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 33.719,78.845 1.742,-0.688 c 0.804,-0.316 1.197,-1.225 0.88,-2.027 -0.316,-0.803 -1.223,-1.199 -2.027,-0.88 l -1.743,0.688 c -0.803,0.316 -1.197,1.225 -0.88,2.027 0.243,0.614 0.831,0.99 1.455,0.99 0.19,0 0.385,-0.035 0.573,-0.11 z"
|
||||
id="path36"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 43.213,72.764 c 0.293,0.486 0.81,0.755 1.339,0.755 0.276,0 0.554,-0.072 0.807,-0.226 l 1.276,-0.771 c 0.739,-0.446 0.976,-1.407 0.529,-2.146 -0.447,-0.74 -1.409,-0.977 -2.146,-0.529 l -1.276,0.771 c -0.738,0.446 -0.975,1.407 -0.529,2.146 z"
|
||||
id="path38"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 51.571,62.268 -1.45,0.72 c -0.772,0.385 -1.088,1.323 -0.704,2.096 0.273,0.55 0.826,0.868 1.401,0.868 0.234,0 0.47,-0.053 0.695,-0.163 l 1.449,-0.721 c 0.772,-0.384 1.089,-1.322 0.704,-2.096 -0.384,-0.772 -1.318,-1.088 -2.095,-0.704 z"
|
||||
id="path40"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 56.506,55.662 c 0.708,-0.494 0.881,-1.469 0.388,-2.177 -0.495,-0.708 -1.47,-0.882 -2.176,-0.388 l -2.197,1.532 c -0.709,0.494 -0.882,1.469 -0.389,2.176 0.305,0.437 0.789,0.67 1.283,0.67 0.309,0 0.62,-0.092 0.893,-0.281 l 2.198,-1.532 z"
|
||||
id="path42"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 56.378,45.247 c 0.301,0.453 0.797,0.698 1.303,0.698 0.297,0 0.598,-0.084 0.863,-0.261 l 1.48,-0.984 c 0.72,-0.478 0.915,-1.448 0.437,-2.167 -0.478,-0.72 -1.449,-0.914 -2.166,-0.437 l -1.48,0.984 c -0.72,0.478 -0.916,1.448 -0.437,2.167 z"
|
||||
id="path44"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 46.861,35.624 c 0.199,0.084 0.404,0.124 0.607,0.124 0.609,0 1.189,-0.36 1.441,-0.957 l 0.557,-1.322 c 0.335,-0.795 -0.038,-1.712 -0.833,-2.047 -0.798,-0.337 -1.713,0.038 -2.048,0.833 l -0.557,1.322 c -0.335,0.795 0.038,1.712 0.833,2.047 z"
|
||||
id="path46"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 33.675,25.045 c 0.396,0 0.792,-0.149 1.096,-0.449 l 0.914,-0.899 c 0.615,-0.606 0.623,-1.595 0.018,-2.211 -0.607,-0.615 -1.596,-0.623 -2.211,-0.018 l -0.914,0.899 c -0.615,0.606 -0.623,1.595 -0.018,2.21 0.307,0.313 0.711,0.468 1.115,0.468 z"
|
||||
id="path48"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 43.749,25.498 c 0.396,0 0.792,-0.149 1.097,-0.449 l 0.995,-0.98 c 0.614,-0.606 0.622,-1.595 0.016,-2.21 -0.605,-0.614 -1.595,-0.623 -2.21,-0.017 l -0.995,0.98 c -0.614,0.606 -0.623,1.595 -0.017,2.21 0.306,0.31 0.71,0.466 1.114,0.466 z"
|
||||
id="path50"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 27.986,34.515 c 0.17,0.059 0.342,0.087 0.513,0.087 0.647,0 1.253,-0.406 1.477,-1.051 l 0.476,-1.37 c 0.283,-0.816 -0.149,-1.707 -0.964,-1.99 -0.817,-0.283 -1.707,0.149 -1.989,0.964 l -0.476,1.37 c -0.284,0.816 0.148,1.707 0.963,1.99 z"
|
||||
id="path52"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 62.479,54.467 c 0.214,0 0.432,-0.044 0.639,-0.138 l 1.679,-0.753 c 0.787,-0.354 1.139,-1.278 0.785,-2.066 -0.353,-0.788 -1.279,-1.139 -2.065,-0.786 l -1.678,0.754 c -0.787,0.354 -1.14,1.278 -0.786,2.065 0.26,0.58 0.83,0.924 1.426,0.924 z"
|
||||
id="path54"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 70.042,49.497 c 0.143,0 0.288,-0.021 0.434,-0.062 l 1.482,-0.427 c 0.829,-0.239 1.308,-1.105 1.069,-1.935 -0.239,-0.83 -1.103,-1.31 -1.936,-1.069 l -1.482,0.427 c -0.829,0.239 -1.308,1.105 -1.069,1.935 0.198,0.685 0.822,1.131 1.502,1.131 z"
|
||||
id="path56"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="M 62.933,62.099 C 62.375,61.441 61.388,61.36 60.73,61.919 l -0.963,0.817 c -0.658,0.559 -0.738,1.545 -0.179,2.203 0.309,0.363 0.748,0.551 1.191,0.551 0.357,0 0.718,-0.122 1.011,-0.372 l 0.963,-0.817 c 0.658,-0.559 0.739,-1.545 0.18,-2.202 z"
|
||||
id="path58"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 59.074,72.899 -1.027,0.168 c -0.853,0.139 -1.431,0.942 -1.29,1.794 0.125,0.767 0.788,1.311 1.54,1.311 0.084,0 0.169,-0.006 0.254,-0.021 l 1.027,-0.168 c 0.853,-0.14 1.431,-0.942 1.29,-1.794 -0.139,-0.852 -0.941,-1.433 -1.794,-1.29 z"
|
||||
id="path60"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="M 53.559,78.573 C 53.276,77.757 52.383,77.327 51.57,77.609 l -1.418,0.493 c -0.815,0.282 -1.247,1.174 -0.964,1.988 0.225,0.646 0.83,1.051 1.477,1.051 0.17,0 0.343,-0.027 0.513,-0.087 l 1.418,-0.493 c 0.814,-0.282 1.246,-1.173 0.963,-1.988 z"
|
||||
id="path62"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 45.642,80.044 c -0.12,-0.854 -0.914,-1.445 -1.766,-1.33 L 42.8,78.865 c -0.855,0.121 -1.45,0.911 -1.33,1.766 0.11,0.781 0.779,1.346 1.545,1.346 0.073,0 0.146,-0.005 0.22,-0.016 l 1.076,-0.151 c 0.855,-0.121 1.45,-0.912 1.331,-1.766 z"
|
||||
id="path64"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 28.475,81.963 -1.896,0.223 c -0.857,0.1 -1.471,0.876 -1.371,1.733 0.092,0.796 0.768,1.382 1.55,1.382 0.061,0 0.122,-0.004 0.184,-0.011 l 1.896,-0.223 c 0.857,-0.1 1.471,-0.876 1.371,-1.733 -0.1,-0.857 -0.879,-1.469 -1.734,-1.371 z"
|
||||
id="path66"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="M 25.312,76.528 C 25.174,75.675 24.364,75.097 23.52,75.234 l -2.196,0.354 c -0.852,0.139 -1.432,0.94 -1.293,1.792 0.124,0.769 0.788,1.314 1.541,1.314 0.083,0 0.167,-0.007 0.251,-0.021 l 2.195,-0.354 c 0.853,-0.136 1.432,-0.938 1.294,-1.791 z"
|
||||
id="path68"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 19.225,84.118 -2.152,0.19 c -0.859,0.075 -1.495,0.835 -1.419,1.694 0.072,0.813 0.754,1.426 1.555,1.426 0.046,0 0.093,-0.003 0.14,-0.006 l 2.152,-0.19 c 0.859,-0.076 1.495,-0.835 1.419,-1.695 -0.077,-0.859 -0.833,-1.485 -1.695,-1.419 z"
|
||||
id="path70"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 34.974,86.234 -0.865,0.329 c -0.807,0.308 -1.211,1.21 -0.904,2.018 0.237,0.623 0.831,1.007 1.46,1.007 0.185,0 0.373,-0.033 0.556,-0.104 l 0.865,-0.329 c 0.807,-0.308 1.211,-1.21 0.904,-2.017 -0.305,-0.807 -1.21,-1.211 -2.016,-0.904 z"
|
||||
id="path72"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 46.386,85.388 -0.962,0.037 c -0.863,0.033 -1.535,0.76 -1.501,1.622 0.032,0.843 0.725,1.503 1.56,1.503 0.021,0 0.042,-10e-4 0.062,-10e-4 l 0.962,-0.038 c 0.863,-0.033 1.535,-0.76 1.501,-1.621 -0.033,-0.864 -0.782,-1.533 -1.622,-1.502 z"
|
||||
id="path74"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 65.621,70.353 c 0.211,0.667 0.826,1.094 1.49,1.094 0.155,0 0.314,-0.023 0.47,-0.073 l 1.255,-0.396 c 0.824,-0.259 1.281,-1.137 1.021,-1.96 -0.26,-0.823 -1.141,-1.281 -1.96,-1.021 l -1.255,0.396 c -0.824,0.258 -1.281,1.136 -1.021,1.96 z"
|
||||
id="path76"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 72.124,60.015 c -0.582,-0.638 -1.57,-0.686 -2.209,-0.104 l -0.881,0.801 c -0.638,0.581 -0.686,1.569 -0.104,2.209 0.309,0.339 0.732,0.511 1.157,0.511 0.375,0 0.752,-0.134 1.051,-0.406 l 0.881,-0.802 c 0.638,-0.581 0.686,-1.571 0.105,-2.209 z"
|
||||
id="path78"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 77.292,57.129 c 0.247,0 0.498,-0.06 0.732,-0.184 l 1.417,-0.753 c 0.762,-0.405 1.052,-1.352 0.646,-2.113 -0.403,-0.763 -1.349,-1.053 -2.113,-0.646 l -1.417,0.753 c -0.762,0.405 -1.052,1.352 -0.646,2.113 0.28,0.529 0.82,0.83 1.381,0.83 z"
|
||||
id="path80"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 78.734,63.239 -1.709,0.98 c -0.749,0.43 -1.008,1.385 -0.579,2.134 0.29,0.503 0.816,0.785 1.358,0.785 0.263,0 0.53,-0.066 0.775,-0.206 l 1.71,-0.98 c 0.749,-0.43 1.008,-1.385 0.578,-2.134 -0.428,-0.747 -1.382,-1.005 -2.133,-0.579 z"
|
||||
id="path82"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 71.417,76.305 c 0.171,0.719 0.812,1.204 1.521,1.204 0.119,0 0.239,-0.014 0.36,-0.042 l 1.125,-0.266 c 0.84,-0.199 1.36,-1.04 1.162,-1.881 -0.199,-0.84 -1.045,-1.357 -1.88,-1.162 l -1.125,0.266 c -0.841,0.199 -1.361,1.041 -1.163,1.881 z"
|
||||
id="path84"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 55.714,84.837 -1.482,-0.156 c -0.854,-0.089 -1.627,0.531 -1.719,1.39 -0.09,0.859 0.532,1.629 1.39,1.719 l 1.482,0.157 c 0.056,0.006 0.111,0.009 0.166,0.009 0.789,0 1.468,-0.597 1.553,-1.399 0.09,-0.86 -0.533,-1.629 -1.39,-1.72 z"
|
||||
id="path86"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 64.467,79.771 -1.256,0.201 c -0.852,0.137 -1.433,0.938 -1.297,1.791 0.124,0.769 0.788,1.315 1.542,1.315 0.082,0 0.166,-0.006 0.249,-0.02 l 1.256,-0.201 c 0.852,-0.136 1.433,-0.938 1.297,-1.79 -0.138,-0.853 -0.946,-1.429 -1.791,-1.296 z"
|
||||
id="path88"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 37.305,34.186 c 0.236,0.127 0.49,0.188 0.741,0.188 0.556,0 1.094,-0.297 1.377,-0.82 l 0.897,-1.662 c 0.41,-0.76 0.126,-1.708 -0.633,-2.118 -0.76,-0.409 -1.708,-0.125 -2.118,0.633 l -0.897,1.662 c -0.411,0.759 -0.127,1.706 0.633,2.117 z"
|
||||
id="path90"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 40.487,50.739 c -0.438,-0.744 -1.397,-0.991 -2.14,-0.556 l -1.612,0.949 c -0.744,0.438 -0.993,1.396 -0.556,2.139 0.292,0.496 0.813,0.771 1.349,0.771 0.27,0 0.542,-0.069 0.791,-0.216 l 1.612,-0.947 c 0.745,-0.438 0.994,-1.396 0.556,-2.14 z"
|
||||
id="path92"
|
||||
style="fill:#ff0000"
|
||||
inkscape:connector-curvature="0" /></g></svg>
|
||||
|
After Width: | Height: | Size: 18 KiB |
18
install-little-backup-box.sh
Executable file
18
install-little-backup-box.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo apt update && sudo apt dist-upgrade -y && sudo apt install rsync exfat-fuse exfat-utils ntfs-3g minidlna gphoto2 -y
|
||||
|
||||
sudo mkdir /media/card
|
||||
sudo mkdir /media/storage
|
||||
sudo chown -R pi:pi /media/storage
|
||||
sudo chmod -R 775 /media/storage
|
||||
sudo setfacl -Rdm g:pi:rw /media/storage
|
||||
|
||||
crontab -l | { cat; echo "@reboot sudo /home/pi/little-backup-box/backup.sh"; } | crontab
|
||||
|
||||
sudo sed -i 's|'media_dir=/var/lib/minidlna'|'media_dir=/media/storage'|' /etc/minidlna.conf
|
||||
sudo service minidlna start
|
||||
|
||||
echo "------------------------"
|
||||
echo "All done! Please reboot."
|
||||
echo "------------------------"
|
||||
Reference in New Issue
Block a user