Hardware Reference
In-Depth Information
5.
Once the initial setup is done, your application settings are stored in a text
file called ~/.dropbox_uploader that could be copied to other computers.
Now we can type dropbox without arguments to get a list of all possible commands.
Let's create a sub-folder in our Dropbox account to hold our agent specific stuff:
pi@raspberrypi ~ $ dropbox mkdir agentstuff
We could, for example, store all the evidence from Detecting an intruder and setting off
an alarm in Chapter 3 , Webcam and Video Wizardry in our agentstuff folder:
pi@raspberrypi ~ $ dropbox -p upload ~/evidence/* agentstuff
The -p flag gives you a handy progress indicator for each file transfer.
Now let's say you add additional files to your agentstuff folder from another
computer and would like to keep a synchronized copy on your Pi:
pi@raspberrypi ~ $ dropbox -p -s download agentstuff
The previous command will create a mirror copy of the agentstuff folder, but will
skip files that may already exist. The -s flag makes the command more suitable to be
run repeatedly, as part of backup script or a cron job like in the following example:
0 * * * * dropbox -s download agentstuff /home/pi/agentstuff
The previous crontab entry will make sure your agentstuff folder is kept up to
date once every hour. See Scheduling regular updates earlier in this chapter for more
details on cron.
Keeping your data secret with encryption
In this section, we'll create a file container, you can think of it as a vault, and we
encrypt whatever is put inside. As long as the vault is unlocked, files can be added to
or deleted from it just like any regular filesystem, but once we lock it, no one will be
able to peek inside or guess what's in the vault.
This technique will give you an encrypted vault mounted under a directory.
You can then add files to it as you wish, and once locked, you can copy it and
open it up in Windows.
We'll be using a tool called cryptsetup that will help us create and manage the
encrypted containers:
pi@raspberrypi ~ $ sudo apt-get install cryptsetup
 
Search WWH ::




Custom Search