Backup to NAS when available again.
Hello,
TI2020 creates a backup on Synology NAS. The NAS is not always active. TI says the backup failed.
Can I set TI to do this when NAS is available again, then start backup?
Regards
André


- Anmelden, um Kommentare verfassen zu können

Andre, you can use a Pre Command for your backup task to your NAS to check for the device being available on your network and only continue with the task if it is.
:: File Name = CheckIP.Bat @echo off :: ---------------------------------------------------------- :: ----- Set baseIP to the NAS IP address to be checked ----- :: ---------------------------------------------------------- set baseIP=192.168.0.29 set loopcount=20 :: Checking for active baseIP address on local network :: errorlevel 0 = IP found / 1 = IP not found. :loop echo pinging %baseIP% for %loopcount% times ping -n 1 -l 1 %baseIP% > nul if %errorlevel%==1 goto next @echo %baseIP% found active on network! timeout /t 10 exit /b 0 :next @echo %baseIP% not found active on network! set /a loopcount=loopcount-1 if %loopcount%==0 goto exitloop timeout /t 10 goto loop :exitloop if %errorlevel%==1 exit /b 1 exit /b 0
I have used the above approach with my own Synology NAS backup tasks on my laptop when travelling to check whether I was on my home network or not, and not run the task when away from home.
- Anmelden, um Kommentare verfassen zu können

Hello Bruno, hello Steve,
the NAS may be active 1 or 2 times a week. The days and hours are different. The NAS is in the same apartment. Three computers should back up on it.
I've seen that a backup can be started as soon as a USB drive is connected. Is that not possible for network drives? Always pinging the IP and then starting the task if successful?
Steve's script looks good. But how do I start the backup or backups afterwards?
- Anmelden, um Kommentare verfassen zu können

I don't know of a solution that will cause an event to happen when the NAS is available, so you'll need to periodically check for it.
Since the NAS is not on often, one method would be to schedule a task using the Windows Task Scheduler to check for the NAS (using Steve's script perhaps), and if the NAS is present you could start the backup task as described in this article. How often to schedule the task would be up to you. Once a day? Every log on?
Or, just schedule the backup task at a certain frequency and use Steve's script as a Pre-command.
Or, just let the task fail if the NAS is not there... Not the way I'd do it, but it would not require any extra scripting.
- Anmelden, um Kommentare verfassen zu können

André wrote:the NAS may be active 1 or 2 times a week. The days and hours are different. The NAS is in the same apartment. Three computers should back up on it.
I've seen that a backup can be started as soon as a USB drive is connected. Is that not possible for network drives? Always pinging the IP and then starting the task if successful?Steve's script looks good. But how do I start the backup or backups afterwards?
Andre, is there a schedule that is making the NAS active at particular times, if so, then you could schedule your Acronis backup task to fit with that schedule?
If the NAS being active is truly random and unpredictable, then I would suggest considering setting up a schedule or enable it to be woken up on demand, so that you could use the Pre Command doing pings to wake the NAS then trigger the backup task to it.
- Anmelden, um Kommentare verfassen zu können

Hello!
Ping and wake up would be an idea. But if all three PCs send a wake-up ping at their own time, the NAS keeps going up and down.
It worked with the batch! Thanks to both of you!
I let the backups start via the Windows task. But I still have to find out how the next task will run after x days instead of every two hours. If the backup was previously without errors.
Sorry I don't know how to put code here.
- Anmelden, um Kommentare verfassen zu können

André wrote:Hello!
Ping and wake up would be an idea. But if all three PCs send a wake-up ping at their own time, the NAS keeps going up and down.
It worked with the batch! Thanks to both of you!
I let the backups start via the Windows task. But I still have to find out how the next task will run after x days instead of every two hours. If the backup was previously without errors.
Sorry I don't know how to put code here.
If the NAS wakes up on a ping, then just use that in the Pre Command for your backup task and then schedule the task to only run on specific days in the week or month. The batch script I posted earlier will repeat the ping for 20 times with 10 second intervals when no response is received, which should allow sufficient time for the NAS to wake and be ready to receive the backup file(s).
- Anmelden, um Kommentare verfassen zu können

Here I am sending you my script.
Not particularly nice, but it works. :-)
Anhang | Größe |
---|---|
553201-204482.zip | 1.33 KB |
- Anmelden, um Kommentare verfassen zu können

Andre, you should be using the TrueImageLauncher.exe program rather than TrueImageHomeNotify.exe to launch your backup task in your script.
Example:
@echo off
set ATI="C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageLauncher.exe"
set task1=3C11DD90-8D9C-4CF2-9EBA-AD7C32294D2Becho Launching ATI Task
%ATI% /script:%task1%
See KB 54944: Acronis True Image: How to Create a Shortcut for a Backup Task for the official documentation on doing this.
- Anmelden, um Kommentare verfassen zu können

- Anmelden, um Kommentare verfassen zu können

Strange that KB 47143 contradicts KB 54944 here! I have never used TrueImageHomeNotify to launch backup tasks via a script and had never considered doing so as the advice was always to use TrueImageLauncher for this purpose!
I normally use Powershell for such tasks but did originally use simple Windows batch scripts.
See example in attached zip file.
Anhang | Größe |
---|---|
553292-204519.zip | 1015 Bytes |
- Anmelden, um Kommentare verfassen zu können

I just looked at those two KB articles. KB 54944 is for ATI 2016 and is dated to 2016. KB 47143 is for ATI 2019. I wonder why the change?
- Anmelden, um Kommentare verfassen zu können