Aller au contenu principal

Problems with Rename-Full.bat

Thread needs solution

Using TI 2010, build 6053.

I found the above script from GroverH and it's exactly what I'm looking for. I'd like to create full backups several times a week and keep 9 of them at all times, deleting the oldest one when creating the 9th one. I want to have 2 different backup tasks, one for assorted documents around my hard drive and another for my e-mail.

I've edited the batch file to fit my needs (I'm showing the e-mail file in this post).
Here is the file:
ECHO OFF
C:
CHDIR C:\Backups\Mail
IF NOT EXIST Mail-.tib EXIT
IF EXIST Mail-9.tib DEL Mail-9.tib
IF EXIST Mail-8.tib REN Mail-8.tib Mail-9.tib
IF EXIST Mail-7.tib REN Mail-7.tib Mail-8.tib
IF EXIST Mail-6.tib REN Mail-6.tib Mail-7.tib
IF EXIST Mail-5.tib REN Mail-5.tib Mail-6.tib
IF EXIST Mail-4.tib REN Mail-4.tib Mail-5.tib
IF EXIST Mail-3.tib REN Mail-3.tib Mail-4.tib
IF EXIST Mail-2.tib REN Mail-2.tib Mail-3.tib
IF EXIST Mail-1.tib REN Mail-1.tib Mail-2.tib
IF EXIST Mail-.tib REN Mail-.tib Mail-1.tib
EXIT

The name of the file is MailFull.bat

If I create a task without calling the batch file it simply overwrites Mail-.tib with each subsequent backup. I can recover files from the backup and everything seems to work fine -- the only limitation being that I only have one backup file at any given time.

Here's where the script comes in. I've tried this multiple ways, creating new tasks each time I want to change something. The results are always the same. At the completion of the backup task I have a file called Mail-1.tib. So far so good. When I run the task again I still have only the single file Mail-1.tib, and the time stamp on the file matches the latest backup. So the file is still getting overwritten. Also, I can't restore from this backup; the program doesn't see the TIB file when I browse for backups.

When I look at the task log for a job that calls the backup file I see this comment:
Child process has exited with code '0'
I've attached a screen shot. The first log entry is without the batch file and second is with the file.

This has all the makings of a stupid (but simple) mistake I'm making when setting up this task. Is there an issue with TI 2010 and batch commands? Can anyone see anything obvious that I'm missing? GroverH, have you seen this before?

Thanks for your help,
Ken

Fichier attaché Taille
TI_Log.JPG 50.5 Ko
0 Users found this helpful

Use Chain2gen for this activity it is much more powerful and much less prone to errors/issues.
The grover script you are using as a template was written long before chain2gen was invented.
If you see grover's signature he too is using chain2gen for this type of process.

The zip file for chain2gen includes a PDF of step by step instructions on how to configure/use.
You should have no problems/issues configuing/using chain2gen.

http://forum.acronis.com/forum/5940

Wow; that's some impressive stuff. It's intimidating at first glance but after looking through it I jumped in and got everything configured.

Following your instructions I got everything to work as expected. The instructions in your pdf file are great. I chose to create a new full backup file every time, so when editing the User_Specified_Params file I used Option 1, and set the variable to 1. The rest of the steps worked as you describe in your instructions.

I then created the backup task, again following your instructions. The initial backup job worked. I then wanted to test the whole proces so I manually started the job again. The process hangs on 'Carrying out user command', step 1 of 2, which is the running of PreProcessing_Task. When I look in my Set0 folder there is a new file there called trigger.txt. The file contains 1 line that reads "Hit TRGR_ON_MAX_TIB_CNT = 1".

At this point I have no choice but to cancel the backup job since it won't continue. If I restart the backup again there is a second line added to the trigger.txt file that reads the same as the first. If I run the backup job a third time there are now 3 lines in the trigger.txt file.

So, it looks like the initial part of the batch file is doing what it's supposed to. Do you have any ideas why it's not completing? Did I miss something in the instructions? Should I not manually test this?

Thanks again for the great software and the help,
Ken

PROBLEM SOLVED.

When I double-clicked on the PreProcessing_Task file it did as it's supposed to do. But I noticed that it also gave me 3 different prompts to ask me if I wanted to open a particular file. I noticed there was a box in the lower left corner, essentially asking me if I wanted to be prompted each time this file was opened. I removed the check mark, meaning 'open the file every time'. I didn't write down the exact verbage but I think you know what I'm referring to here.

Anyway, the backup jobs now work without error.

Thank you very much for this code.

Ken

My posting below is late and may be non-relevant. But I had spent time on it so I went ahead for you to read my comments. I'm glad to you have Chain2Gen assisting.
Absolutely yes, you should try Chain2Gen. It offers many more options than my batch file. I have switched. Combine Chain2Gen with DrvNotify for a really nice backup package.

If you have not read my pdf file for the batch file you are using, it can be found here.
http://forum.acronis.com/sites/default/files/forum/2009/10/4703/Full_De…

An amended revised response is below. I chose to place the response here rather than a new post as this response relates only to the preceding question and not the ongoing discussion about Chain2Gen.
--------------------------------------------------------------------------------
Dec 26
I have been able to recreate your issue of not being to increase the number of archives. The problem is exactly as you describe and appears to be caused by changes made within TrueImageHome. It would appear that TrueImage will not allow full backups to be named -1, -2, -3. etc and remain in the same folder. The solution which worked for me with 2010 was to simply edit the batch file and change the renamed file name from numeric to alpha or alpha-numeric. Below is the revision based on the information provided. It will work either as an TrueImage Pre or Post processing task and also works using a the same script via a desktop shortcut.

ECHO OFF
C:
CHDIR C:\BACKUPS\MAIL
IF NOT EXIST Mail-.tib EXIT
IF EXIST Mail-X9.tib DEL Mail-X9.tib
IF EXIST Mail-X8.tib REN Mail-X8.tib Mail-X9.tib
IF EXIST Mail-X7.tib REN Mail-X7.tib Mail-X8.tib
IF EXIST Mail-X6.tib REN Mail-X6.tib Mail-X7.tib
IF EXIST Mail-X5.tib REN Mail-X5.tib Mail-X6.tib
IF EXIST Mail-X4.tib REN Mail-X4.tib Mail-X5.tib
IF EXIST Mail-X3.tib REN Mail-X3.tib Mail-X4.tib
IF EXIST Mail-X2.tib REN Mail-X2.tib Mail-X3.tib
IF EXIST Mail-X1.tib REN Mail-X1.tib Mail-X2.tib
IF EXIST Mail-.tib REN Mail-.tib Mail-X1.tib
EXIT

The link below illustrates the successful results of the changes which were made to my batch file to retain only full type backups.
-----------------------------------------------------------------------------

Fichier attaché Taille
14784-86686.png 11.17 Ko

Ken,
When you have the time, reading the other postings in the Chain2Gen posting would help you to understand the program even more. Merry Christmas.

Ken,

Nice job on solving your own problem. (post #3 of this thread)

You certainly are not the 1st to use chain2gen but are the first to report this issue.
I am fairly sure that this is cause by windows trying to protect you from code downloaded from the internet. Effectively windows marks it the code as "dirty" until you deem it clean.

I will figure either a solution or set of instructions to resolve this issue.
I will publish this solution back into the chain2gen thread as a new version.
Since this would not be a functional change just a documentation (or zip file) change it will a minor point release (the .1) of v2.2.1

FYI oracledba: I'm using Win XP SP3. I think you're exactly right in your guess that Windows was trying to protect me. I see these types of messages routinely in my computer activities so I don't pay that much attention to them. If I want the file to open (as I've just asked it to), I tell it YES, open the file. I'm surprised that nobody else has seen this though. Oh well, we're working now so it's all good.
If you like I can get you some screen shots of the files it's asking approval for. Let me know if you want them.

Grover --
I know I'm not supposed to be on C drive. I'm about to redo my system and will have another internal and an external drive soon. I just wanted to get the groundwork done and make sure I had a working backup routine before moving forward.

I never did try your batch file as a PRE command. But it did not work as you describe as a POST command. The original tib file would be renamed to 1, but on subsequent backups there would be no 2 file. TI would simply overwrite the 1 file with the new backup. More than likely it's something I did in the creation of the backup task, but I tried it several different ways with no luck.

We're good here -- thanks again for all the help. Oracle, let me know if I can send you any additional info on the trouble I had.
Ken

Ken,

I have been UN-able to reproduce your issue.
Hence can not resolve it on this end.
I have a favor to ask...

Please check your PM (private messages) on this acronis forum.
the message body conains my personal email.

If you would be so kind as to perform the following test for me and email me the results?

thank you.
.........................................

Please re-extract chain2gen zip file already in your possession
into another folder - same drive, same level just a new folder name

example
if your existing chain2gen is on
\\mydrive\myfolder\mysubfolder\chain2gen\
make a new copy at
\\mydrive\myfolder\mysubfolder\chain2gentest\

in this new folder perform all the tasks as if you were configuring chain2gen for the 1st time.
Just like you did the 1st time Please edit
!_USER_SPECIFIED_PARAMS_FOR_ACRONIS.bat
(do NOT specify the exact same target folder what you are using for backups now
-as I do NOT want to affect your existing backups,
instead specify a test target folder to receive the ".tib" files).

Now like you did originally run
!_USER_SPECIFIED_PARAMS_FOR_ACRONIS.bat
this will perform a "syntax check" of your data entry. as well as place fully
qualified set0 path into your clipboard.

Now like you did originally run
Acronis_PreProcessing_task.bat
this will create the target folders set0 thru set(n)

Now here comes something new:
- the following two steps I am hoping will reproduce the issue you were seeing
which of course would give us the opportunity to address the security dialog box
as part of the install/config stage of chain2 gen.
--> This is important to me --> Each time you get the security warning dialog box please perform a screen capture of it (set focus on the security dialog box by clicking its title bar then do an
"alt printscreen" to capture the image in your clipboard.
Paste this image either into WORDPAD and email me the wordpad document
or if your email program supports it paste the image directly into the message body of the email to me.
The new steps to be performed at this point in the chain2gen install/config process is:

step 1) run !_FORCE_NEW_CHAIN.bat
this will create file "trigger.txt" in your target (set0) folder.

step 2) run once again Acronis_PreProcessing_task.bat
this time we are running " Acronis_PreProcessing_task.bat" for "real".
and this time the program will find file "trigger.txt" and will process it
(clear folder set0 by rotating the folder contents up a level)

As indicated already, point and purpose of the two additional steps is to "exercise"
additional modules of chain2gen.
I am trying to get a handle on which modules caused your security warnings.
if you DO see the security dialog box please do the screen capture
AND also set the checkbox so you no longer have to deal with the
security warning again for that program.

I'm hoping/looking for is that the "step 1" and "step 2" instructions above.
create an effective "workaround" to the issue you experienced.

Lets test this theory by defining a new backup job
(this new job does NOT need to be a fill partition image, it can be a
file level backup of some small folder - anything that runs quick will be fine)
In this new job please create the pretask which calls our new
Acronis_PreProcessing_task.bat

Please run the job a few times, I need for two or more generations to occur.
please either configure the job such that it creates generations with each run
OR use !_FORCE_NEW_CHAIN.bat to cause a new generation to occur with the next backup.

With luck you will not only be able to reproduce the issue but report that the workaround resolves it - if so I can incorporate your screen prints into the install pdf instructions.

THANKS in advance for your effort on this.