Overview

For me, backing up my files on Windows 10 involved using the "Back up and Restore (Windows 7)" feature. I always found this process to be time consuming and flaky, no matter what settings I chose.

Wanting something better, I investigated a few options. I looked into dedicated back up software before eventually settling on a script called rsync time backup, which emulates a macOS Time Machine backup experience using the open source rsync utility available on most Linux distributions.

Either rsync time backup or rsync on its own will work, but I went with rsync time backup for it's various quality-of-life features.

rsync does not natively work on Windows 10 but the Windows Subsystem for Linux (WSL) makes installing and using it much easier.

Instructions

Install the Windows Subsystem for Linux

Follow the instructions on the "Windows Subsystem for Linux Installation Guide for Windows 10".

It will involve running a command in PowerShell and then restarting.

Install a Linux distribution from the Microsoft Store

After installing WSL, install a Linxu distribution from the Microsoft Store. I installed the Ubuntu distribution.

Set up the installed Linux distribution

Launch the installed Linux distribution from the Windows 10 Start menu. A console window will appear the first time it is launched and will perform some initial set up.

A user account and password will then need to be created for the Linux distribution. Follow the "Create a user account and password for your new Linux distribution" guide for help on doing this.

At this step, you can use the Linux machine to run rsync as normal. The following steps detail my backup process using rsync time backup.

Install rsync time backup

To install rsync time backup, you will need to install Git. Git installation instructions can be found on the Git website.

With Git installed, install rsync time backup using Git clone in a directory of your choosing.

Set up an ignore file

Create a file alongside the rsync time backup installation named rsync-exclude.txt and use this to include file and folder patterns for anything you want to be excluded in the backup, e.g.:

$RECYCLE.BIN/
System Volume Information/

Set up a Bash script for running backups

rsync time backup can be used as a standalone command but I found it convenient to wrap it in a Bash script to save typing the arguments out. I created a backup.sh file with the following:

#!/bin/sh
start='date +%s'
sudo rsync-time-backup/rsync_tmbackup.sh /mnt/<drive> /mnt/<drive>/rsync-time-backup rsync-exclude.txt
end='date +%s'
runtime=$((end-start))
printf '\nBackup time: %02dh:%02dm:%02ds\n' $(($runtime/3600)) $(($runtime%3600/60)) $(($runtime%60))

This will capture the time that the backup starts, perform the backup (using rsync time backup), capture the time that the backup ends and print the total duration of the backup in the console.