Backup my files before it is too late
I keep on telling my self after I finished using my laptop each time.
Nowadays I’m not able to run my time machine as frequently as I code more often than usual while I’m on the move.
This also create another problem: files I made is consuming more storage before I can archive them and freeing the space up.
In short, I’m desperate for a robust, light weight remote time machine alternative, which can work over slow and intermittent Internet connection.
Not another proprietary software, not anybody else’s computer
As I’m low on budget and don’t always feel safe to use cloud storage for personal files, I investigated solutions that can be self hosted. It was during when I run into rsync.
Preloaded on Mac OSX and most Linux distribution, rsync works perfectly as a simple Dropbox alternative
To my surprise, not only one can easily host a rsync server, it can be very fast, safe, robust and versioning can be easily supported with a very little effort.
- Incremental backup is supported as long as the client is properly configured, only files has been modified will be transferred after the initial backup.
- The rsync connection is tunnelled through SSH, so public key and many other PAM modules can be used to enhance the security.
- As rsync has been around a very long time, it mainly focus on syncing files and it is doing the job really great, it can resume syncing from partially transferred files and handle permissions or special attributes assigned to files gracefully, not to mention dealing with soft/hard links.
- It requires some effort to support versioning, which is a must for a proper backup plan, one may consider rsnapshot or rsync-time-backup , both seemed very promising. If your rsync server is dedicated for backup, you may consider using LVM snapshot or Btrfs/ZFS snapshot.
- There are currently no good way to make rsync works bidirectional, as conflict resolving mechanism is missing, meanwhile rsync does not track delete timestamp. If 2-way sync is a must, maybe try Syncthing instead, which will require additional software and a sightly more complicated setup.
- The rsync community is relatively vivid as a very old open source project, it has multiple GUI, a handful of wrappers that improves interoperability with other programming languages, the protocol has even been reimplemented in Node.js , .NET and Java, etc.
- It is open source, one don’t need to pay a monthly subscription to get more storage, just go purchase a bigger hard drive instead.
I’m overall very satisfied with the setup. With the help of macOS automator folder action, my current setup will immediately start rsync when file is modified or added to a dedicate folder - exactly the way Dropbox works.
I believe time can proof the rsync is a worthy companion of my daily coding life.