How to Backup Files Using Node.js and Rsync

Tate Galbraith
The Startup
Published in
6 min readJan 7, 2021

--

Photo by Markus Winkler on Unsplash

Managing backups is the technological equivalent to the big, ugly elephant in the room. Everyone knows its there, but nobody wants to deal with it. What’s worse, there are hundreds of different ways to implement a backup solution. You can purchase some off-the-shelf software, use an open-source solution or roll-your-own custom project. There are pros and cons to each type of solution and depending on your environment and the sensitivity of data you might not even have much choice.

If you’re tired of using third-party tools that don’t perform the way you want and you have the flexibility to settle on a bespoke path forward you should consider building your own solution. When you craft a custom backup solution you have total control over when, how and where the data gets backed up. The best part is you can write it using languages and programs you’re already familiar with.

In this article we’ll focus on building a custom backup solution. We’ll use familiar, free tools to accomplish this and the code will be straightforward and easily extensible. Node.js is a massively popular backend built on JavaScript and allows you to integrate your solution with almost any modern framework. If you haven’t heard of Rsync before, it is easily one of the most robust and efficient backup applications available. We’ll combine these two elements to create a simple…

--

--

Tate Galbraith
The Startup

Software Engineer @mixhalo & die-hard Rubyist. Amateur Radio operator with a love for old technology. Tweet at me: https://twitter.com/@Tate_Galbraith