Sunday, July 26, 2015

Installing atticmatic/borgmatic on Cygwin

There's a wrapper project for Attic / Borg backup called "Atticmatic" on GitHub.  It helps simplify the process of doing daily backups using attic/borg.

Packages needed on Cygwin (in addition to those needed for attic/borg):

  • murcurial (hg)
Creation of the SSH key (assumes that you have the 'openssh' package installed):
  1. mkdir ~/.ssh
  2. chmod 700 ~/.ssh
  3. ssh-keygen.exe -t rsa -b 4096 -N '' -C 'Backup Key 2015' -f ~/.ssh/ssh-backup
  4. chmod 600 ~/.ssh
Then create a ~/.ssh/config file to point at the server:

Port 22
User usernameonbackupserver
IdentityFile ~/.ssh/ssh-backup

Add the new public key to the remote server, to the ~/.ssh/authorized_keys file for the 'usernameonbackupserver' account.

Now test that you can login to the remote server, using "ssh" (use the "Host" line entry from ~/.ssh/config).  And make sure that you can create files/directories in the location where you want to store the backups.

Make sure that your Attic/Borg backup has been initialized.

$ borg init ssh://

Now you'll need to create an empty /etc/borgmatic/exclude file and edit the sample /etc/borgmatic/config file.  Once those files are setup, you can run "borgmatic" (or "borgmatic -v 1" to see details) on a regular basis.

No comments: