windows install instructions
This commit is contained in:
19
README.md
19
README.md
@@ -322,6 +322,25 @@ This is one of may ways you can get restic and this backup script working on Win
|
||||
git-bash$ mkdir ~/src && cd ~/src/
|
||||
git-bash$ git clone https://github.com/erikw/restic-systemd-automatic-backup.git && cd $(basename "$_" .git)
|
||||
```
|
||||
1. Install scripts, conf and the ScheduledTask
|
||||
```console
|
||||
git-bash$ make install-schedtask
|
||||
```
|
||||
1. Edit configs and initialize repo according to *TL;DR* section above
|
||||
```console
|
||||
git-bash$ vim /etc/restic/*
|
||||
git-bash$ source /etc/restic/default.sh
|
||||
git-bash$ restic init
|
||||
git-bash$ restic_backup.sh
|
||||
```
|
||||
Note that you should use cygwin/git-bash paths e.g. in `default.env.sh` you can have
|
||||
```bash
|
||||
export RESTIC_BACKUP_PATHS='/c/Users/<username>/My Documents'
|
||||
```
|
||||
1. Inspect the installed tasks and make a test run
|
||||
1. Open the app "Task Scheduler" (`taskschd.msc`)
|
||||
1. Go to the local "Task Scheduler Library"
|
||||
1. Right click on one of the newly installed tasks and click "run".
|
||||
|
||||
|
||||
## Setup Cron
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env pwsh
|
||||
# Install restic scheduled tasks.
|
||||
# Test run the installed actions by opening the app "Task Scheduler" and go to "Task Scheduler Library" and right clicking on the new tasks > run.
|
||||
# Test run the installed actions by
|
||||
# 1. open the app "Task Scheduler" (taskschd.msc)
|
||||
# 2. go to the local "Task Scheduler Library"
|
||||
# 3. right click on the new tasks and click "run".
|
||||
# Reference: https://blogs.technet.microsoft.com/heyscriptingguy/2015/01/13/use-powershell-to-create-scheduled-tasks/
|
||||
# Reference: https://www.davidjnice.com/cygwin_scheduled_tasks.html
|
||||
|
||||
@@ -10,8 +13,6 @@ $action = New-ScheduledTaskAction -Execute 'C:\Program Files\Git\git-bash.exe' -
|
||||
$trigger = New-ScheduledTaskTrigger -Daily -At 8pm
|
||||
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "restic_backup" -Description "Daily backup to B2 with restic."
|
||||
|
||||
|
||||
|
||||
# Install restic_check.sh
|
||||
$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Git\git-bash.exe' -Argument '-l -c "/c$INSTALL_PREFIX/bin/restic_check.sh"'
|
||||
$trigger = New-ScheduledTaskTrigger -Weekly -WeeksInterval 4 -DaysOfWeek Sunday -At 7pm -RandomDelay 128
|
||||
|
||||
Reference in New Issue
Block a user