Friday, May 22, 2020

Setting up home NAS - Part 0 - RAID v/s Backup rsync v/s Raspberry Pi v/s Cloud Storage for Youtuber in the year 2020

Background

Regardless we do YouTubing or not, we would be generating a lot of digital assets mainly in the form of media. Mostly from cameras, social media services such as WhatsApp, etc...It is our valuable data and we need to protect it.

Regardless we like or not the failures are inevitable. Hardware will fail one day. As professionals, our goal should be to recover fast. If our assets are some accounts and budgets in excel files, resume, and occasional photos, its easy. One copy in the personal working machine, one copy in flash or external drive, and maybe one in free cloud storage. The problem starts when we cross the normal limit of free cloud storage and regular flash drives. This happens soon when we start YouTubing.

This post is about securing our home and personal media files.

Please note this is not at the enterprise level or when we become a YouTube star. Just a beginner level to make sure the files are not lost in small disasters.

Cost

There is no free option like using open-source software once we cross the 15 GB limit. As of writing this, GDrive offers 15 Gigs free which is the max free option available in the public cloud offerings. There is a wiki page comparing the public cloud storage options.

Oh, wait. There are other options as well on the internet.

Google Photos

Unlimited storage but the quality gets reduced and limits applied. As of writing this post, the limits are
  1. 16 MP, 75MB photos
  2. 1080p, 100GB videos
Google may change it later.

Baidu

Chinese internet Giant offered 2 TB free storage. That can be an option to be tried. Since we trust all the made in China hardware, why can't software service? Chinese language in their site should not be a problem as long as Google translate is there to help.

Options

If we shoot in better cameras that produce files > 100 GB and 4K and don't trust Chinese hosting which may have its own delay to servers, let us come back to home NAS options.

Cloud

Though this is not a home NAS, this cloud storage is an option if
  1. The cost is not a barrier
  2. Like to bear the cost monthly than a single investment.
  3. There are no concerns about storing the media at remote locations
  4. Have a good internet connection. 
As of now, the cost-effective solution among cloud providers seems Microsoft One Drive for 1 TB storage. It now has an online-only option called OneDrive Files on-demand. Once the upload to the cloud is done, we can clear the local storage. But when we navigate the folder, we can see files with a different icon. Whenever an application or user accesses the file, OneDrive client will download it. This helps us to save a lot of space in the hard drive of personal machines. 
Very simple option to have cloud grade features such as redundancy and backup. No need to do research on high availability, disaster recovery, etc...

RAID

This is a technology word and we need to do something to get it working. There is some theory to be understood before choosing. Wikipedia helps with it. For a beginner YouTuber, the RAID 1 would be enough. One more choice to be made is hardware v/s software RAID. Software RAID has some additional configuration.

For beginners, instead of buying a dedicated RAID device, it may be better to buy a refurbished workstation desktop with hardware RAID support. This way we get a workstation machine, mostly the refurbished workstation computers come with a graphics card, ECC RAM, etc...HP Z440 is a good machine to choose from. 

Please note that this is an on-premise solution unless we back it up to some cloud storage. On-premise means it can handle only small failures such as hard disks. If the premise is under disaster such as flooding, fires, etc, we may lose data.

Raspberry Pi 4+ 

The RP 4 onwards, it has 2 USB 3.1 ports. Simply connect 2 drives and use software RAID or backup using rsync to replicate files. Really a low power solution.

RP 4 with Software RAID 1

We can use software mdadm for RAID and samba for exposing the network share.

RP 4 with 'rsync'

If the RAID seems complicated, we can even set up scheduled rsync command to sync 2 drives. Note that RAID and back-up are not alternatives to one another. They can be used together also.

Cost Comparison

Below is a cost comparison. It is in gist which can be forked to customize


What I ended up using

The USB 3.1 port on my router. Sync from my local machine to the drive connected to the router. Below are my rationales
  1. The size is around 300 GB. One copy stored home laptop and the other in router attached USB are good till reaching 500 GB.
  2. Once completed, I normally merge the row video files and upload them into YouTube as private.
As seen in the image, it works till 1TB anyway. There is only 1 USB port so one copy to be kept inside the working machine. SyncToy is used to sync folders. I am using the GUI version, syncing starts manually and works fine. Not sure the command line exists.
However, I did order Raspberry Pi 4 (4GB) as the next step. RPI can be repurposed once that reaches its limit as NAS.

References

No comments: