Code: Select all
ECHO ON
C:
cd "C:\Program Files\Oracle\VirtualBox"
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
set datestr=%year%-%month%-%day%
THEN
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" export Debian -o "E:\AUTOBACKUP\%datestr%.ova" >> E:\log.txt
When I run it manually (from Task Scheduler or directly) it works fine. But when it's being triggered from Task Scheduler automatically, it only creates 13kB ova file... why is that? how to fix/debug it? Run with highest privileges option is checked. Also run whenever user is logged in or not.
PS. Log.txt contains nothing new. But when it was successful on running manually, it wrote "Successfully exported 1 machine(s)." to the log.txt file.
PPS. I also tried using start command, but it did not help. In fact it was even worse, nothing was happening.
PPPS. Is OVA file enough to backup whole machine with additional drive attached?