I was struck with the will to set up my backup and syncing strategy last night. I’ve been using SpiderOak for backup and sync between my computers and phone. Just a few months ago I had a much more complex ecosystem to sync. I kept a desk top computer running Ubuntu and windows along with a laptop running Ubuntu/Windows. So I was syncing files between two machines and four operating systems.
This was a mess, but it mostly worked.
Like all things you really need to have a system down if you’re going to make it work. Before I get into the configuration of the software and services, let me go over my system.
I used to split my files up along imaginary lines or work and personal. Over the past few years everything just kind of melts together. Now I organize everything by projects. Each client is a project which has nested within it other projects. Personal work are also organized as projects, much like my annual report seen here:
I have a _share and _public file within each project. There is a slight difference between these two folders. The share/ folder is for items that might be sensitive or private which I wish to share with some 3rd party (a client or a friend) while public/ is automatically fair game for publishing. I’d like to find a method it automatically share all content within these folders… some other time.
I also keep a web folder in my home directory called www/. This folder (in general, I haven’t fully implemented it…) contain symlinked (shortcut) folders from within project folders. Take a look:
So all the projects are wrapped up fairly neatly… This also means that I don’t need to backup my www/ directory. I’ve also got my local Apache and DNS configured to serve on my localhost any folder in there up as “http://folder_name.lcl”.
I then keep the standard Documents/, Movies/, Music/, and Pictures/ folders in the home directory. It’s where I keep all the things you would expect to find in those folders.
I also keep a folder called devices/ this is where I store backups of my phone and other devices. More on that later.
I also keep a home directory level public/ and share/ folders.
The Backing up
I sync most of the folders in my home directory, here’s a list:
bin/ - binary files, scripts, etc.
devices/ - Backups of my external devices
- phone/ - Full backup of SD card via BitSync
- assets/ - fonts, templates, etc
- records/ - tax stuff
Library/ - mac library
- phone/ - BitSync phone's photos folder
Public/ - files in here show up on LAN and the INTERNET, instantly
- dummy project/
-- sub project/..
SpiderOak Hive/ - This is kind of an annoying default folder in SpiderOak, I would name it "Sync" if I could.
share/ - file and folders here that I wish to do targeted sharing
- sublime/ - symlink shared settings folders between devices
www/ - symlinked web files
All these files are backed up and synced across my computers (currently there is only one) using SpiderOak. This keeps them in the cloud and safe, even if my laptop gets eaten by a shark. I then use BitSync to connect my device to the laptop.
BitSync the phone
I am running the BitSync Android app on my phone. I have two sync folders currently. One is the pictures/ folder on the phone which syncs to Pictures/phone/ on my computer. Strangly enough it’s kind of hard to move files between my computer and phone.
- USB connection forces me to use some insane Android File Transfer program that has a terrible UI.
- BlueTooth is equally cumbersome and slow.
- Mounting over Wifi was working for a time, but was also fairly cumbersome.
One or two files was okay, but moving large numbers of photos over was such a pain!
With BitSync it’s not a problem. Within a few clicks and the scan of a QR code I’ve linked my devices and they will sync over wifi when available.
The other sync folder is device/phone. This is where I keep a full download of the phone. I do, however, make use of BitSync’s .SyncIgnore file. Here’s what mine looks like:
# .SyncIgnore is a UTF-8 encoded .txt file that helps you specify single files, paths and rules
# for ignoring during the synchronization job. It supports "?" and "*" wildcard symbols.
# OS generated files #
# User Rules #
Everything above User Rules is auto generated. I simply exclude the data/ folder and any dot files. Dot files are often hidden from view and contain mostly cache information for apps. The period and asterisk (*) represent a search pattern. It basically says “exclude file or folder name that starts with a period and has any number of characters after it.”
I have the full backup sync set up on the phone to sync only when I initiate it. While the photo sync is automatic.
The settings folder is synced between all my computers. Within it are folders that contain settings information I wish to share with my other computers. There is a good reason the settings files are kept here:
- Synced computers might be running different operating systems.
- This means that the location of a program’s settings file might be in different locations.
- Shared settings files are symlinked (shortcut) to their proper location on each computer.
For example sublime would look something like this:
Computer 1 (windows):
~/settings/sublime/Users -> $appdata\Sublime Text 3\Packages\
Computer 2 (OS X):
~/settings/sublime/Users -> ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
What kind of backing up do you do? Have any nifty ideas, I’d love to hear about them.