JSI Tip 2710. Scheduled backup doesn't work when using different credentials?


When you schedule a backup to run with user credentials that are different from the currently logged on user, the scheduled job starts but the backup exits immediately?

If you go to Scheduled Tasks, the Last Result displays 0x2D.

If you logon as the scheduled user and run NTBackup interactively, the Tools / Report shows:

Skipped files in "NT\Ntbackup\data\<backup_selection_file_name>.bks" folder. Folder not found.

Only the user who scheduled the job has access to .bks file, as it is stored in their profile.

The solution is to store the .bks file in a location that each user has Read access to. If you use the example from tip 2265, you could change:




ntbackup.exe backup "@C:\Documents and Settings\Jerry\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\ALL.bks"
             /n "JSI001 %dtt%" /d "JSI001 %dtt%" /v:yes /r:no /rs:no /hc:on /m normal /j "%dtt%" /l:f /p "4mm DDS" /UM
to
ntbackup.exe backup "@C:\Backup\ALL.bks" /n "JSI001 %dtt%" /d "JSI001 %dtt%" /v:yes /r:no /rs:no /hc:on
             /m normal /j "%dtt%" /l:f /p "4mm DDS" /UM
NOTE: Users in the Run As box in Scheduled Tasks need Read access to the scheduled executable and all associated files.


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish