Skip to content

Mount bind is your friend–or at least friendly.

2010/06/19

A quick easy way to have a transparently backed up drive, using Dropbox and the command line.

create a mount point:
mkdir ~/Sites/my_awesome_website

put your files in a Dropbox folder:
$ mkdir ~/Dropbox/Sites/my_awesome_website
cat > ~/Dropbox/Sites/my_awesome_website/index.html [Enter]




my awesome website



Awesome.

Press CTRL+D. Now the magic.
sudo mount -o bind ~/Dropbox/Sites/my_awesome_website ~/Sites/my_awesome_website

You can edit files in ~/Sites/my_awesome_website and they will be automagically backed up in your Dropbox account. Fancy.

It would be possible to mount your entire local directory that way, or just things like documents and pictures. Other multimedia files would also work, but may require an upgrade to a paid Dropbox plan.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: