Skip to main content
  1. Tags/

Windows

2024


.gitconfig and includeIf Statements

··3 mins
Using different machines to work on some git files can result in missing signign keys and some headache.

2023


Restic backup and Windows paths

·2 mins

I recently stumbled upon restic and since I haven’t really setup a backup of my windows machine1, I wanted to give it a try.

I love it 💛 The software is straight to the point, not bloated and using it in a terminal is a bonus for me!

However, there was one pitfall with windows paths (and I’m not even surprised by this):

  • When you select the folder for the backup, you can choose absolute or relative paths.
  • The backup snapshot will always show the absolute path.
  • Additionally, the path in the snapshot view will be displayed in Windows style (with a colon and backward slashes).
  • The path in the actual backup will vary depending on your backup command and can only be displayed with ls
# Backup C:\Users\restic_demo\Git with an absolute path (ID b713711c)
PS C:\Users\restic_demo> restic -r .\Backup\ backup C:\Users\restic_demo\Git\

# Backup C:\Users\restic_demo\Git with a relative path (ID da8fe3c7)
PS C:\Users\restic_demo> restic -r .\Backup\ backup .\Git\

# Display restic snapshots
PS C:\Users\restic_demo> restic -r .\Backup\ snapshots
repository ebfaab05 opened (version 2, compression level auto)
ID        Time                 Host        Tags        Paths
--------------------------------------------------------------------------
b713711c  2023-09-30 21:47:58  Horscht               C:\Users\restic_demo\Git
da8fe3c7  2023-09-30 22:03:19  Horscht               C:\Users\restic_demo\Git
--------------------------------------------------------------------------

# Display snapshot files and folders for b713711c
PS C:\Users\restic_demo> restic -r .\Backup\ ls b713711c
enter password for repository:
repository ebfaab05 opened (version 2, compression level auto)
snapshot b713711c of [C:\Users\restic_demo\Git] filtered by [] at 2023-09-30 21:47:58.6977882 +0200 CEST):
/C
/C/Users
/C/Users/restic_demo
/C/Users/restic_demo/Git
/C/Users/restic_demo/Git/blog.bdw.li
/C/Users/restic_demo/Git/blog.bdw.li/.git

# Display snapshot files and folders for da8fe3c7
PS C:\Users\restic_demo> restic -r .\Backup\ ls da8fe3c7
enter password for repository:
repository ebfaab05 opened (version 2, compression level auto)
snapshot da8fe3c7 of [C:\Users\restic_demo\Git] filtered by [] at 2023-09-30 22:03:19.7184899 +0200 CEST):
/Git
/Git/blog.bdw.li
/Git/blog.bdw.li/.git

I no case would I be able to restore the data using the path from the snapshot view C:\Users\restic_demo\Git. It took me a few confused minutes to figure that out. And I didn’t find anything about it in the docs. At last in the Github issue #2792 was a side note that mentioned the proper paths.

Mailstore Home: Archive mailboxes automatically

·1 min

I’m using Mailstore Home to archive my personal emails for a while now. And while I didn’t find any specific documentation on command line options, you can actually use /c archive --id=$n to automatically start the archive process on application start. I currently archive three mailboxes and my scheduled task looks something like this:

MailStoreHome.exe /c archive --id="1,2,3"

At the end I still have to close the Mailstore Window manually. There are tools like AutoIt, that you can use to hide the GUI, but I don’t mind closing the window myself. The task runs right after my login and I just let it do it’s thing in the background. It usually doesn’t take longer then a minute anyway. If you do mind the window, check out the article on andysblog.de1.