Containerizing My Media Center

Back in February when my family went on vacation I spent a lot of time playing around with Docker. I converted several applications I was running on raspberry pi’s to run in Docker containers on my Synology Diskstation.

The challenge I gave myself was could I set up the containers to run on the NAS (The Diskstation) while at the same time being able to run them on my Mac mini as a backup in case there was any problems. That meant I needed to figure out how to replicate the configuration information between the devices.

I solve that challenge by setting up a new Resilio Sync folder for all of my Docker config’s. In most cases there was little to no reconfiguration needed to have those config files work on the NAS or the Mac mini. It wasn’t a super elegant solution since it did require human intervention however switching between systems was not something I intended to do often.

I did run into problems getting Plex to run as a container. I was having performance issues in general running Plex on my NAS. My solution was to setup Plex on my Mac mini as a native app. At some point I want to go back and figure out how to get Plex working in a container. Even when I do that I will still need to build a new machine to host it on. The Diskstation just doesn’t have the power to run Plex and my sync application at the same time anymore.  Even with the 4gig I upgraded the disk station to a year or so ago is now not enough.. For now I can continue to use Plex on my Mac. Longer-term I have bought components to build myself a Linux application server to host all of my containers so I can make my disk station just host files.

My Personal Private vs Public Cloud Debate

I have been pondering my 321 Backup strategy for several months now.  Even before I had a near catastrophic issue with my Sinology DiskStation back in April I knew I wanted a more robust data management plan for my personal files.  I had been using the Sinology Cloud Station software but in my original configuration I was limited since all my data centered around my apartment.  This is convenient but not the safest approach.  I also only really had 2 copies of most of my data.  A really rock solid strategy has 3 copies across 2 sites, and if possible different media types.  I knew i wasn’t doing things good enough.

One solution I toyed around with was BitTorrent Sync.  Back in March I tried it out and had big problems with the UI on my desktop and the web interface on my DiskStation not loading regularly.  I didn’t feel the solution was ready for me to use yet.  I wasn’t confident in the Cloud Station software anymore since I ran into a data integrity issue with it in March.  I had uploaded photos I took in march and noticed that they hadn’t gotten to my Diskstation when they were saying they were syncing off my Desktop.  To make things more confusing the files were syncing to my laptop but not the Diskstation.

That problem lead me to the BitTorrent Sync option and the decision to upgrade to a beta version of the Synology software.  That in turn lead me to some problems I had an my near fatal event with the Diskstation.  So basically in a mission to solve my backup strategy problem i caused an event that a better backup strategy would have solved.

My near loss of all my data on the DiskStation was my wake up call that I needed to really figure some working solution out.  After I recovered (barely) from that incident I focused large amounts of time on solving data strategy.

After my trust was shaken with the Cloud Station data integrity problems I experienced I began to look at public cloud solutions.  I am very concerned about security so I discounted many public cloud providers.  Dropbox, and pretty much any American based solution is just not trustworthy with todays laws.  Dropbox employee’s can even get into your files if they need to regardless of the safeguards they claim to have I do not want anyone being able to get into my stuff unless I let them in.  That security concern lead me to MEGA.  They weren’t US based and they don’t have a way into your data.  Their plans were more expensive than most cloud providers however their 2TB plan more than covered my needs.

One downside was that MEGA didn’t have any built in backup solution for the Diskstation.  That meant I could backup my data to the cloud but the Diskstation wouldn’t be my main data source.  I could still use it as a home server but not the home of my data.  I wasn’t really pleased about that however I couldn’t really find an alternative that worked.  So earlier this spring I jumped into using MEGA as my cloud sync / backup solution.  It had a lot of what i wanted but it wasn’t perfect. It was the best of what was available that worked for me.

I spend a few weeks seeding and confirming my data was correct in MEGA before trying to make a sync copy onto my Laptop.  That was when I ran into issues.  What i noticed was after a while syncing files I would get to a point were the MEGA agent would freeze.  Sometimes after only 70-100 files downloaded.  I would restart the agent and it would do the same thing and copy a few more files and then stop.  I couldn’t really figure it out.  I tried reinstalling, putting the agent on another machine, checking their online help but i was unsuccessful at finding a solution.  This was an issue on top of a general annoyance I had were it would take 5-10 minutes for my admin page on the MEGA site to load.  I don’t know what it was doing but in any browser (chrome, firefox, or safari) i would have the same issue.  that wasn’t a show stopper however add to it that i can’t download a replica of my data onto my laptop I was very concerned.

After a week of tinkering I gave up and had no choice but to revert my decision and go back to Cloud Station software by Synology.  I didn’t want to bother calling MEGA.  I had a confidence issue and even if they could fix the issue in 10 minutes with my level of technical knowledge and online tools i should be able to figure it out.  If i can’t i have concerns about their service.  It wasnt like my problem was complex.  The system just stopped syncing data after a few files.

I wasn’t pleased however MEGA was never the perfect solution for me.  I knew that going into it but thought i could make it work.  In the end I couldn’t so I went back to Diskstation as my primary data store and used Cloud Station to sync.  I kept an eye on the data i synced to make sure i didnt have a repeat issue.  My plan to build another DiskStation and leave it with a friend was back on the table.  That was until about a week ago.

I don’t know what got me to look at BitTorrent Sync again however I installed it again.  I knew they were actively releasing newer versions so I had hoped that what happened the last time was an issue that was solved after a few months.  I was pleasantly surprised to see after some brief testing that the UI display issues appeared to be solved.  I slowly over a few days turned off syncing via Cloud Station and enabled BitTorrent Sync.  I made backups before my changes just in case.  The UI consistently worked on the desktop.  For the web interface on the DiskStation what i learned was first safari wasn’t so great for it.  Second that clearing my cookies for the site typically solved the issue.  With that issue resolved I moved most of my shares over to the BitTorrent Sync app within a week.  I was originally going to try out the system for 30 days and then decide if i wanted to pay for the Pro version.  After going over the 10 share limit for the trial i opted to pay for the 1 year Pro for $39.

As of right now I have my desktop, DiskStation NAS and laptop all replicating data with the new Sync software.  I am at a steady state like were i was back in March.  This steady state took a lot of research and trial and error however now is the harder part.  Now I need to finish this project and meet my objective of a true private cloud with data located in multiple locations.

Using BitTorrent Sync gives me a few options I didn’t have with the Synology centric Cloud Station.  My remote backup locations do not need to have a DiskStation.  I have two old Mac Mini’s that I could provision with external hard drives and drop them in remote locations.  That was my original idea at least. Now I am thinking bolder and cheaper.  If I am successful I will have a prototype to talk about soon.

Raspberry Pi Cloud Node Prototype

The first phase of my BitTorrent Sync project is mainly complete.  I now have the Sync software running on my Diskstation, Mac Mini desktop and my Macbook Pro laptop.  I have replaced my Sinology Cloud Station app and all files are kept up to date using BitTorrent Sync.  That change gets me to a point were I was before with Cloud Station.  I have access to all my files everywhere however I do not have a complete backup solution since most of the data is only current in two places.  Those places are 15 feet from each other and not really giving me much disaster recovery.

The next phase of my backup / cloud strategy is to have offsite copies of my data or large parts of my data in case of anything happening at home.  I originally planned to do this with a 2nd Sinology Diskstation somewhere.  The costs were very high and that solution limited me to one other location.  When I was thinking of using Cloud Station software from Sinology that solution made sense, however now that I got BitTorrent Sync to work I have other options.
Raspberry Pi & Drive

is bit torrent sync my answer to sync situation

My Evolving Use of Cloud Storage

Last year I canceled my pay Drobo subscription. I still have the service but with a lot less storage. At the time I wanted to build my own “cloud” storage system.  In reality I wanted to take my data at home and make it syncable via the internet like a cloud storage provider to my devices were ever i was.  Originally I bought a Transporter that I had hopes would take a 1TB drive and let me sync data to my computers.  That dream lasted about a week.  Their sync software was problimatic for me.  Instead I opted for a Synology NAS DS412+.  The added app’s functionality and redundant storage allowed me to move all my data to the Synology and no longer rely on my aging Drobo(s) as my primary storage system.  The Synology also allowed me to move some multimedia functions i did on my mac mini off to the NAS.  So far I have been very happy.  The Synology Cloud Sync app gives me Dropbox like functionality with my personal stuff.  The other file access options the Synology offers gives me access to all my data.  To do that with any other provider would be prohibitivly expensive because of the amount of data stored on the NAS.

The timeing for this change to self hosting my data was perfect.  I couldn’t realistically do what I am doing now earlier because when I had Time Warner my upload speeds were horrible (1.5mb).  After I moved to Fios my upload speeds jumped to between 25-35mb.  I have no problems using the Synology.

The problem with the Synology is that as much as the NAS itself is designed to last and has some drive resiliance in it, I do not have an offsite backup.  I used to copy my data manually for a while but now a days that is not a good idea.  it is also not feasable with the amount of data i have now.

After leaving Dropbox I read more and more about the potential issues with public cloud providers.  Such as Dropbox knows what you upload and wont keep a duplicate copy of a file of music if others have it.  That means they can (and i believe they have) removed content if there is a DMCA request.  I am also increasingly uneasy about US based hosting providers and the easy the government can get access to data.  I am not a criminal and don’t really have anything to hide in what I am storing however those are not reasons why I should be ok with the ease of government access to my data.  I will talk about that more in another post.  In relation to cloud storage I am glad I do not use Dropbox, however I put myself in the same situation with another provider.

Because I have so much data and I need to really be thinking about a 321 backup sceme I started using Crashplan and Amazon Glacial.  Crashplan I recently canceled because I was having problems with my copy of data on my Drobo that i would sync to Crashplan.  The crashplan app kept thinking that the drobo was disconnected and would keep creating new copies of my data.  When it takes weeks to sync a backup using crashplan having a new copy get created every so often is not good.  With that issue and the fact that the Crashplan Synology app caused my Synology to perform super slow to the point that I uninstalled it I gave up on Crashplan and canceled it.

Amazon Glacial has been good so far.  The challanges with Glacial is that the cost per month varries by how much i use it.  It is also much more expensive than Crashplan for the amount of data i have.  Another challange is getting data out is expensive in the event of a major issue.  Thankfully i havent had to worry about that yet but it is a concern.  The most current concern I have is that Amazon is a US based company and my data is hosted on US servers.  For now I am living with that risk.  My rational side says I dont do anything to warrent the government to want my data however I would rather that not even be an option.

One alternative to Dropbox I have been looking at is Mega.NZ.  They don’t have any access to my data once it is uploaded.  They offer 50gig free.  It is good to replace dropbox for some files i have and to give my most important stuff an offsite backup but it is not enough to backup my music, videos, and photos.  Their 1tb option is doable for me but even that isn’t enough to backup everything.  For now I will continue with Glacial as my backup.  I am investigating working with a friend or two to replica sync our Synologies between each other.  The cost of that may not be worth it but it is an interesting idea.