"Plug-in harddisk, start backup and wait until completed.""
- Install Git (2.24.0, 2019-11-04)
- Select Components
- Uncheck Additional icons
- Uncheck Windows Explorer integration
- Check Git LFS
- Check Associate .git* configuration files with the default text editor
- Check Associate .sh files to be run with Bash
- Uncheck Use a TrueType font in all console windows
- Uncheck Check daily for Git for Windows updates
- Choosing the default editor used by Git
- Select Use the Nano editor by default
- Adjusting your PATH environment
- Select Git from the command line and also from 3rd-party software
- Configuring the line ending conversions
- Select Checkout as-is, commit as-is
- Configuring the terminal emulator to use with Git Bash
- Select Use MinTTY
- Select Components
- Install VeraCrypt (1.24-Hotfix1, 2019-10-27)
- Install Macrium Reflect 7 - Free Edition (7.2.4539, 2019-11-18)
All described commands are being executed from a git-bash for Windows (not elevated).
# Clone _this repository_
git clone https://github.com/fbau3r/backstage.git "$ALLUSERSPROFILE/backstage2"
# Init machine configuration from a git-bash
$ALLUSERSPROFILE/backstage2/init-machine.sh
# Pull repository
(cd "$ALLUSERSPROFILE/backstage2" && git pull)
# Remove _this repository_ from machine
([[ -d "$ALLUSERSPROFILE/backstage2" ]] && rm -fR "$ALLUSERSPROFILE/backstage2")
# Review if you want to keep machine configuration
([[ -d "${USERPROFILE}/.backstage" ]] && explorer /select,"$(cygpath -w "${USERPROFILE}/.backstage")")
To run the backup, plug-in the external disk with encrypted file container (setup see below) and run backup-machine.cmd
as Administrator (elevated mode):
backup-machine.cmd
- Format disk with NTFS filesystem
- In Disk Properties:
- Set the disk name to be
Backup Container NN
(whereNN
is replaced by a number) - Uncheck disk indexing
- Add Group Everyone with permission Full control and remove any other groups or users (recursively)
- Set the disk name to be
- Copy directory contents of
assets/external-disk/*
to disk - Change
LABEL
toBackup Container NN
inautorun.ini
- Hide
autorun.*
files
- Start VeraCrypt in elevated mode (at the end of formatting an NTFS disk, elevation will be needed and if the elevation prompt times out, formatting fails)
- Click Button Create Volume
- Choose Create an encrypted file container
- Click Button Next
- Choose Standard VeraCrypt volume
- Click Button Next
- Choose Volume Location on the external disk
(e.g.
E:\my-backup-name.vc
) - Click Button Next
- Leave Encryption Options as they are
- Click Button Next
- Choose Volume Size to hold the future backup
(rule of thumb:
current disk usage + ~25% potential growth space
) - Click Button Next
- Leave Password empty
- Check Use keyfiles
- Click Button Keyfiles...
- [Optional] If you don't have a keyfile yet, generate a new keyfile by clicking Button Generate Random Keyfile... and following the procedure in that dialog
- Click Button Add Files...
- Browse for Keyfile -IMPORTANT- Please backup this keyfile separately somewhere else! If this key is lost, the encrypted backup will be lost too! See chapter Backup Keyfile.
- Click Button OK
- Click Button Next
- Choose Volume Format NTFS and collect some randomness
- Click Button Format
- Wait for the formatting to finish, this may take quite some time...
- Click Button OK in the success message dialog
- Click Button Exit to exit the wizard
- Mount the encrypted file container
- In Disk Properties:
- Set the disk name to be
Backup Disk
- Uncheck disk indexing
- Add Group Everyone with permission Full control and remove any other groups or users (recursively)
- Set the disk name to be
- Copy directory contents of
assets/encrypted-disk/*
to disk - Hide
autorun.*
files
-IMPORTANT- Please backup this keyfile separately somewhere else! If this key is lost, the encrypted backup will be lost too! See chapter Backup Keyfile.
The backups are inside an encrypted file container to secure the transport of the external disk and to allow for multiple backups of different persons on one external disk, with everyone reading only their own data.
To backup the keyfile, the key file is put in a 7-Zip archive which is then AES-256 encrypted and protected with a password. That protected key is placed on another machine than the backup machine.
For recovery purposes you will need the external disk and the password protected backup of the keyfile.
- Create a sha256sum file from the keyfile:
- Open bash
- Change to directory of keyfile
(e.g.
cd ~/.backstage
) - Create file
(e.g.
sha256sum 8d0b-fedbb02e8e70.key > 8d0b-fedbb02e8e70.key.sha256sum
)
- Create encrypted, password protected archive
- Open 7-Zip
- Change to directory of keyfile
(e.g.
~/.backstage
) - Select key file and checksum file
(e.g.
8d0b-fedbb02e8e70.key
and8d0b-fedbb02e8e70.key.sha256sum
) - Click Button Add
- Choose Archive name
(e.g.
8d0b-fedbb02e8e70.7z
) - Ensure Archive format 7z
- In Encryption group
- Enter password to protect your key with
- Choose Encryption method AES-256
- Check Encrypt file names
- Click button OK
- Put the encrypted, password protected archive to a location which is not the backed-up-disk and not the external disk (e.g. on your NAS or on another local machine)