Scheduled backups

Hi, I am trying to schedule backups using resticprofile from my PC to my Unraid server running on the same network. I created a dedicated share in Unraid and mounted it to B:\ on Windows.

Unfortunately the scheduler cannot detect the share. I also learned that SMB might not be the best version for my use case so now I would like to use SFTP instead, however I have no idea where to start.

I was hoping to get some help here to get SFTP to work in this setup.

# yaml-language-server: $schema=https://creativeprojects.github.io/resticprofile/jsonschema/config.json

version: "1"

default:
  repository: local:B:\os
  password-file: password.txt

  prevent-sleep: true

  backup:
    source:
      - C:\Users\Daniell\.ssh
      - C:\Users\Daniell\Documents
      - C:\Users\Daniell\Downloads
      - C:\Users\Daniell\iCloudDrive
      - C:\Users\Daniell\Music
      - C:\Users\Daniell\Pictures
      - C:\Users\Daniell\Videos
      - Y:\Projects
      - Y:\Repositories
    # https://creativeprojects.github.io/resticprofile/configuration/getting_started/index.html#schedule
    schedule: hourly
    schedule-priority: background
    schedule-log: profile-backup.log
    exclude-file: excludes.txt
    run-after:
      - restic check
  retention:
    keep-hourly: 24
    keep-daily: 7
    keep-weekly: 4
    keep-monthly: 60
  forget:
    schedule: daily
    prune: true

hi @daniellwdb welcome but please provide more information (as suggested when you created the topic here). I do see that you already created an issue on resticprofile github page with more information.

What is the output of resticprofile when you run it manually and more importantly how is the resticprofile task defined in the windows scheduler?

For example I had one task which I had to change to “Run only when user is logged on” else it could not access mounted shares (also not using UNC path). This can be related to access rights as I am in an AD domain. Just to say that without more information we can only guess.

PS C:\Users\Daniell> resticprofile --dry-run backup
2026/01/21 17:39:50 using configuration file: profiles.yaml
2026/01/21 17:39:50 profile 'default': starting 'backup'
2026/01/21 17:39:50 dry-run: C:\Program Files\WinGet\Links\restic.exe backup --exclude-file=excludes.txt --password-file=password.txt --repo=local:B:\os C:\Users\Daniell\.ssh C:\Users\Daniell\Documents C:\Users\Daniell\Downloads C:\Users\Daniell\iCloudDrive C:\Users\Daniell\Music C:\Users\Daniell\Pictures C:\Users\Daniell\Videos Y:\Projects Y:\Repositories
2026/01/21 17:39:50 profile 'default': finished 'backup'
2026/01/21 17:39:50 dry-run: restic check

default forget.xml:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2026-01-21T17:41:13+01:00</Date>
    <Author>resticprofile</Author>
    <Description>resticprofile forget for profile default in profiles.yaml</Description>
    <URI>\resticprofile backup\default forget</URI>
    <SecurityDescriptor>D:AI(A;;FA;;;BA)(A;;FA;;;SY)(A;;FRFX;;;LS)(A;;FR;;;AU)</SecurityDescriptor>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2026-01-22T00:00:00+01:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-18</UserId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <Duration>PT10M</Duration>
      <WaitTimeout>PT1H</WaitTimeout>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>8</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>C:\Users\Daniell\AppData\Local\Microsoft\WinGet\Packages\creativeprojects.resticprofile_Microsoft.Winget.Source_8wekyb3d8bbwe\resticprofile.exe</Command>
      <Arguments>--no-ansi --config profiles.yaml run-schedule forget@default</Arguments>
      <WorkingDirectory>C:\Users\Daniell</WorkingDirectory>
    </Exec>
  </Actions>
</Task>

default backup.xml:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2026-01-21T17:41:13+01:00</Date>
    <Author>resticprofile</Author>
    <Description>resticprofile backup for profile default in profiles.yaml</Description>
    <URI>\resticprofile backup\default backup</URI>
    <SecurityDescriptor>D:AI(A;;FA;;;BA)(A;;FA;;;SY)(A;;FRFX;;;LS)(A;;FR;;;AU)</SecurityDescriptor>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <Repetition>
        <Interval>PT1H</Interval>
        <Duration>PT23H</Duration>
        <StopAtDurationEnd>false</StopAtDurationEnd>
      </Repetition>
      <StartBoundary>2026-01-21T18:00:00+01:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-18</UserId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <Duration>PT10M</Duration>
      <WaitTimeout>PT1H</WaitTimeout>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>8</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>C:\Users\Daniell\AppData\Local\Microsoft\WinGet\Packages\creativeprojects.resticprofile_Microsoft.Winget.Source_8wekyb3d8bbwe\resticprofile.exe</Command>
      <Arguments>--no-ansi --config profiles.yaml run-schedule backup@default</Arguments>
      <WorkingDirectory>C:\Users\Daniell</WorkingDirectory>
    </Exec>
  </Actions>
</Task>

I ended up using sftp which works fine

1 Like