Getting started with resticprofile

Hi Author,
i have some weird issues i cannot comprehend. here is the scenario.

  1. i created multiple profile both backup to local drives, and backup to remote drive at both google and onedrive
  2. all manually executed backup works without issues
  3. all scheduled executed backups to remote drive works without issues
  4. however, all scheduled executed backups to local drive failed repeatedly.

i am using windows 10, and scheduled the backup using "resticprofile -n p01 schedule
". when it was at the time of backup, it failed. even if i manually execute it in task scheduler, it still failed.

i tried both this way to write the repo in windows in .yaml file. using this repository: “G:\100 Backups\restic\mine” works perfectly to backup manually executed using command line. and also work perfectly for rclone backend for both manual and schedule.

repository: “G:\100 Backups\restic\mine”
commented out repository: “G:/100 Backups/restic/mine”

in window task schedule, this is the setting for action:
C:\resticprofile\resticprofile.exe

argument: --no-ansi --config c:\resticprofile\profiles.yaml --name p01 --log c:/resticprofile/p01/backup.log --lock-wait 2h0m0s backup

start in: C:\Users\myusername

i use this in the .yaml to create backup.log
schedule-log: “{{ .ConfigDir }}/{{ .Profile.Name }}/backup.log”

in linux, schedule-log: “{{ .ConfigDir }}/{{ .Profile.Name }}-backup.log” work without issues

one of the status.json file:
{“profiles”:{“p01”:{“backup”:{“success”:false,“time”:“2024-06-19T01:08:24.7599288+08:00”,“error”:“exit status 1”,“stderr”:“Fatal: unable to open config file: CreateFile \\?\G:\100 Backups\restic\mine\config: The system cannot find the path specified.\nIs there a repository at the following location?\nG:/100 Backups/restic/mine\n”,“duration”:1,“files_new”:0,“files_changed”:0,“files_unmodified”:0,“dirs_new”:0,“dirs_changed”:0,“dirs_unmodified”:0,“files_total”:0,“bytes_added”:0,“bytes_total”:0},“retention”:{“success”:true,“time”:“2024-06-16T15:30:53.3917985+08:00”,“error”:“”,“stderr”:“”,“duration”:2}}}}

msg from backup.log

. Backup started at 19 Jun 2024 01:32 SGT

2024/06/19 01:32:14 INFO profile ‘p01’: starting ‘backup’
Fatal: unable to open config file: CreateFile \?\G:\100 Backups\restic\mine\config: The system cannot find the path specified.
Is there a repository at the following location?
G:\100 Backups\restic\mine

. Backup Failed

‘gotify’ is not recognized as an internal or external command,
operable program or batch file.
.
2024/06/19 01:32:14 ERROR backup on profile ‘p01’: exit status 1

1 Like

Hi,

I suspect the G: drive is a network drive right?

Scheduled tasks run in a different session than a standard user session and the network drives are not connected.

You should try with the full path of the network drive: \\server\share\path\to\restic

1 Like

you are right, G: drive is a network drive. the issue i finally traced down to be user permission issues. that network drive is with unraid smb share with specific user credential not same as windows user.

so i need to use schedule-permision: user then also change the task schedule setting to run only when user is logged on. any other setting will cause the backup to fail. this setting also means i no longer can run the backup in bacground. will need to find workaround.

image

1 Like

@alcw Good info! Thanks for sharing.

with the latest v0.28.0, are we able to do the in-place restore? if yes, then how to enable it?

with the latest v0.28.0, are we able to do the in-place restore? if yes, then how to enable it?

resticprofile shouldn’t affect this operation. What error does restic itself throw?