Win11 backup advice

hello,
i am planning to backup my win11 laptop with restic. I was thinking about kopia but it doesnt support VSS, thats the reason why i drop it.

Is there any best practice how to backup win 11 machine with scripts? What folders include / skip etc?

Also i assume there is still no gui for restic?:frowning:

I want to replace arq with restic ,ā€¦ hope its a good idea? Also i want to push backup to restic rest server that i run on my truenas. From truenas i will sync encrypted backup to s3/google etc.

Any corrections / hints appreciated.

Thanks!

1 Like

fond something like that > GitHub - kmwoley/restic-windows-backup: Powershell scripts to run Restic backups on Windows

but not sure ā€¦ its 500 lines of codeā€¦ how buggy it will beā€¦ maybe something more simper is fine?

1 Like

I backup my Win 10 with restic using the VSS option. I recommend telling your virus checking program to ignore the restic exe file because reading the large quantities of data causes the virus checker to look harder at the program is doing which slows down the backup. I suggest dumping the windows registry to a file using the RegEdit.exe /e command.

There are lots and logs of directories which could be skipped if you assume that you can reinstall Windows from a disk. Be sure to back up the users/appdata because some apps store data there.
Restic works so well that it was the method I used to migrate from an old pc to the current one.

1 Like

@punchcard thanks,
what backend do u use? Rest-server or minion or just fs?

dumping win reg for a what purpose?

Do you mind to share a script?

Also VSS is not default during backup execution?

One more question - once u backup data, and want to do a restore - do u backup somehow mbr, or u just do fresh OS install and restore data?
I also use Acronis True image for a image backup, so i can restore from the image OS latest state; but such a backup is executed 1per day, so i need restic for a more frequent files backup.

Also I assume restic has to be executed via schedule so it might be good to add something as real-time backup using ViceVersa PRO and VVEngine ā€“ TGRMN Software? I havent tested that software so no clue now.

1 Like

The backend is just an external drive only plugged in when the backup is running. For my purposes, I use an internal hard drive as the Windows File HIstory and the external for the restic backup. I run the restic backup about once per week. This is protection against ransomware.
I have never actually needed to restore the win reg but so many unknown things get stored there I want to ensure it is backed up.
For my needs I only restore a single file or a small subdirectory of files.
The script I use is grungy so Iā€™d recommend searching through the forum for links to scripts because they sill be much better quality.

1 Like

Iā€™m also new to restic and currently I run a simple backup.cmd per scheduled task to backup some folders on my work-pc.

includes, excludes, repo and password are defined in txt-files.
vss is also enabled.

Iā€™m currently not on my pc so Iā€™m not sure what are my includes and excludes.
But Iā€™m sure that includes contains C:\Users and excludes some folders inside C:\Users

to find appropiate excludes I first did two backups with the same includes and checked the diff of both snapshots for changed files that I can ignore.

1 Like

I too use restic on some Windows 10 and one Windows 11 machine. I only back up the userā€™s ā€œhome directoryā€, or in some cases just their Documents directory. It works fine, regardless.

1 Like

any chance where to find some best practices/restic setup etc?

thanks

1 Like

Not sure what you are looking for. Just run restic to back up your stuff? Whatā€™s stopping you?

1 Like

Basically you create a ā€œbare metal restoreā€ image of your Win11 installation with a different app and then you use Restic to backup the important folders/data frequently.

Restic does not have configuration basically. It is a command with a ā€œfewā€ parameters. Restic is pretty simple, but simple can be tedious if you have multiple sources and/or destinations and ā€¦ Having no configuration is both a strength (you can get started quickly) and a weakness (sooner or later you will write your own shell/batch files, reinvent the wheel, ā€¦).

If you want configuration (and sooner or later most do), I recommend to look into Resticprofile

https://creativeprojects.github.io/resticprofile/

It is command line compatible with Restic but also supports configuration.

The author writes:

Resticprofile is the missing link between a configuration file and Restic backup

1 Like

@restician great, thanks ā€¦
just wondering is there some good / recco sw to bare metal restore image of win11?

also still not sure about backend of restic ā€¦ if i should go with minio or rest restic api

thanks!

1 Like

Ask about image software in a Windows forum :slight_smile:

And which backend to use is unrelated to the Win11 question, so I would create a new topic for that.

1 Like

Not entirely clear what youā€™re looking for, but when I was on Windows I used Macrium Reflect to create a full image back up of my entire hard drive. That image can be restored to a blank hard drive. It also did incremental backups. I highly recommend it if thatā€™s what youā€™re after.

1 Like

@DigitalMan
great, thank you so much ā€¦ seems once i setup macrium with restic i might be done.
HAvent heard about macrium and seems its the bestā€¦ was using Acronis but dont like itā€¦

appreicate

1 Like

maybe one more question ā€¦ how often do u guys run the restic? on some 3-4h interval? or once per day?

Thanks

1 Like

You should decide that on how often your data changes and with how much data loss you can live if something happens.

For example, if your data changes just once a week, maybe it doesnā€™t make sense to run a backup every hour.

@DigitalMan was reading thu some other forums seems Acronis is better choice as Macrium.

@AlBundy How do you schedule the backups? With scripts, Windows Task manager or resticprofile?

Once per day

simple scripts and windows task-scheduler.

I have a folder c:\restic with restic.exe and following scripts:
backup.cmd

@ECHO OFF

REM create backup every hour
REM schtasks /CREATE /SC HOURLY /TN "restic\backup" /TR C:\restic\backup.cmd /RU SYSTEM /ST 08:00
REM create backup on logon (invisible)
REM schtasks /CREATE /SC ONLOGON /TN "restic\backup" /TR C:\restic\backup.cmd /RU SYSTEM
REM create backup on logon (visible)
REM schtasks /CREATE /SC ONLOGON /TN "restic\backup" /TR C:\restic\backup.cmd /RU %USERDOMAIN%\%USERNAME% /IT /RL HIGHEST
REM manually change task to
REM Run task as soon as possible after a scheduled start is missed
REM and
REM If tasks fails, restart every 10min
REM    Attempt to restart up to: 3 times

%~dp0restic.exe --repository-file %~dp0restic_repository.txt --password-file %~dp0restic_password.txt backup --use-fs-snapshot --exclude-caches --exclude-file %~dp0restic_excludes.txt --files-from %~dp0restic_includes.txt --verbose %*

forget.cmd

@ECHO OFF

REM forget every friday 12:30
REM schtasks /CREATE /SC WEEKLY /D FR /TN "restic\forget" /TR C:\restic\forget.cmd /RU %USERDOMAIN%\%USERNAME% /IT /RL HIGHEST /ST 12:30
REM manually change task to
REM Run task as soon as possible after a scheduled start is missed
REM and
REM If tasks fails, restart every 10min
REM    Attempt to restart up to: 3 times

%~dp0restic.exe --repository-file %~dp0restic_repository.txt --password-file %~dp0restic_password.txt forget --keep-within-hourly 48h --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --group-by host --tag "" --prune %*

r.cmd (just for convenience)

@ECHO OFF

%~dp0restic.exe --repository-file %~dp0restic_repository.txt --password-file %~dp0restic_password.txt %*

restic_includes.txt

C:\restic
C:\Users
C:\ProgramData
D:\Eigene Dateien

restic_excludes.txt

C:\Users\*\.cache
C:\Users\*\AppData\Local\ConnectedDevicesPlatform
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\Favicons
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\History
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\History-journal
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\JumpListIconsRecentClosed
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\Network\Cookies
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\Network\Network Persistent State
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\Network\TransportSecurity
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\Preferences
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\Sessions
C:\Users\*\AppData\Local\Microsoft\Windows\INetCache
C:\Users\*\AppData\Roaming\Element\
C:\Users\*\AppData\Roaming\Microsoft\Office\Recent
C:\Users\*\AppData\LocalLow\Microsoft\CryptnetUrlCache
C:\Users\*\AppData\Local\Apps\Remote Desktop
C:\Users\*\AppData\Local\Citrix
C:\Users\*\AppData\Local\CrashDumps
C:\Users\*\AppData\Local\Google\Chrome\User Data\*\*Cache\
C:\Users\*\AppData\Local\Microsoft\CLR_v2.0
C:\Users\*\AppData\Local\Microsoft\OneDrive\logs
C:\Users\*\AppData\Local\Microsoft\WindowsApps
C:\Users\*\AppData\Local\Microsoft\Windows\ActionCenterCache
C:\Users\*\AppData\Local\Packages
C:\Users\*\AppData\Local\Temp
C:\Users\*\AppData\Local\WebEx
C:\Users\*\AppData\Local\lxss
C:\Users\*\AppData\Local\npm-cache
C:\Users\*\AppData\Roaming\Microsoft\Windows\Recent\

C:\ProgramData\Avira\Endpoint Protection SDK
C:\ProgramData\Packages
C:\ProgramData\Microsoft

to create the list I did two backups and compared the snapshots to find the files and folders to exclude.

And you need of course restic_repository.txt and restic_password.txt

In the comments above youā€™ll find the command to create a new scheduled task.
The tasks can be modified in the task scheduler to your needs.

Al

1 Like