Dave,
That is really nice. A menu is something I hadn't considered but it makes sense as the choices would be appropriate on occasions. In fact you could add extra choices to the menu such as backing up and restoring other partitions.
Great work.
Dave,
That is really nice. A menu is something I hadn't considered but it makes sense as the choices would be appropriate on occasions. In fact you could add extra choices to the menu such as backing up and restoring other partitions.
Great work.
I wanted the menu as a "way out" in case I got stuck in a reboot loop, but the more I thought about it the more things I figured I could do with it. But your right, it could easily be setup to do other automated tasks and then you jusy change the default action to do something else.
Yes,
I have searched for a while, no answeres here or google searches for this seemingly simple question
I have machines with 2 partitions partition 1 is c: Partition 2 is D:
D: has the .gho image I want to restore to C:
ghost.exe resides on th D:
I get no results when I use
ghost -clone,mode=pload,src=d:\restore.gho,dst=1:1 -fx -sure -batch (borrowed this from the internets)
ghost and the image are on D:
I don't understand how the parameters above would force the restore on C: anyway sice there is no refrence
I want to use the msft task scheduler to trigger restoring C: From a saved image in partition D:
Is what I'm requesting even possible?
The purpose of Mike's thread is to have an automatic restore. Your menu allows that but it also allows other choices if they are needed. I like that menu a lot.
I have a CD with a 9 choice menu. I needed more so I had to create a second menu. I use it in my test computer to quickly restore OS.
menu1.bat is
@echo off
REM example of displayed menu using CHOICE command
:menu
cls
echo.
echo Please Select From The Options Below:
echo.
echo 1. Restore 6
echo 2. Restore Ubuntu
echo 3. Restore Win7 basic
echo 4. Restore Win7 Ghost
echo 5. Restore WinXP Ghost
echo 6. Restore SRP Win7 basic
echo 7. CopyWipe
echo 8. Second menu
echo E. Exit batch file
echo.
choice /c12345678e "Your choice: "
echo.
if errorlevel 9 goto exitbatch
if errorlevel 8 goto option8
if errorlevel 7 goto option7
if errorlevel 6 goto option6
if errorlevel 5 goto option5
if errorlevel 4 goto option4
if errorlevel 3 goto option3
if errorlevel 2 goto option2
if errorlevel 1 goto option1
:option1
echo This is Restore 6
echo.
pause
call rest_6.bat
goto menu
:option2
echo This is Restore Ubuntu
echo.
pause
call ubun_4.bat
goto menu
:option3
echo This is Restore Win7 basic
echo.
pause
call win7.bat
goto menu
:option4
echo This is Restore Win7 Ghost
echo.
pause
call win7gh.bat
goto menu
:option5
echo This is Restore WinXP Ghost
echo.
pause
call rXPG.bat
goto menu
:option6
echo This is Restore SRP Win7 basic
echo.
pause
call srpwin7.bat
goto menu
:option7
echo This is CopyWipe
echo.
pause
call copywipe.bat
goto menu
:option8
echo This is Second menu
echo.
call menu2.bat
goto menu
:exitbatch
menu2.bat is
@echo off
REM example of displayed menu using CHOICE command
:menu
cls
echo.
echo Please Select From The Options Below:
echo.
echo 1. Backup 6
echo 2. Backup Ubuntu diff
echo 3. 33
echo 4. 44
echo 5. 55
echo 6. 66
echo 7. MBRWork
echo 8. DiskEditor
echo E. Exit Second Menu
echo.
choice /c12345678e "Your choice: "
echo.
if errorlevel 9 goto exitbatch
if errorlevel 8 goto option8
if errorlevel 7 goto option7
if errorlevel 6 goto option6
if errorlevel 5 goto option5
if errorlevel 4 goto option4
if errorlevel 3 goto option3
if errorlevel 2 goto option2
if errorlevel 1 goto option1
:option1
echo This is Backup 6
echo.
pause
call Back_6.bat
goto menu
:option2
echo This is Backup Ubuntu diff
echo.
pause
call Ubdiff.bat
goto menu
:option3
echo This is 33
echo.
pause
::call win7.bat
goto menu
:option4
echo This is 44
echo.
pause
::call win7gh.bat
goto menu
:option5
echo This is 55
echo.
pause
::call de.bat
goto menu
:option6
echo This is 66
echo.
pause
::call mbrwork.bat
goto menu
:option7
echo This is MBRWork
echo.
pause
call mbrwork.bat
goto menu
:option8
echo This is DiskEditor
echo.
pause
call de.bat
goto menu
:exitbatch
Hey thats real slick.
It's been a long time since I did much DOS. Although it works without it, I really should use the "call" command to run one batch from another.
I also really like how you echoed all the menu choices on the screen like that.
Much better looking and easier to read.
I think I'll borrow (steal) that part from you. ;)
DaveH wrote:
I think I'll borrow (steal) that part from you. ;)
That's how I got most of it.
Hey Mike,
We're anxious to hear about your progress.
Dave,
I followed your example and setup a Virtual PC with WinXP and a DOS partition containing Ghost 2003. It is scheduled to restore the WinXP partition every 10 minutes. I love automation. Each restore cycle only takes 3 minutes.
I need to update and fix one of my employees home computers this week and I been thinking about doing the same for her.
She has ghost 2003 and I thought it would be nice to schedule images. Maybe once or twice a month and in between just run a file and folder backup of stuff that changes.
I been meaning to see if there is some variable that can be used for the image date.
I also been thinking of some way to maybe keep only 2 or 3 older images and delete the rest. Maybe have 3 folders:
current, 2weeks, and lastmonth and have it delete the lastmonth folder and rename the others before making a new folder with the current image.
How do you handle that on your systems, or do you just need the most current image?
Dave
Dave,
Would this suit?
My image creation command line (example) for Ghost 2003 is..
ghost -clone,mode=pcreate,src=1:1,dst=2:2\winxp.gho -z1 -fx –sure
Let’s say you only wanted to keep the last 3 .gho images, you could run a batch file after each winxp.gho has been created.
IF EXIST ghost_C.gho (DEL ghost_C.gho)
IF EXIST ghost_B.gho (REN ghost_B.gho ghost_C.gho)
IF EXIST ghost_A.gho (REN ghost_A.gho ghost_B.gho)
REN winxp.gho ghost_A.gho
Note, ghost_A.gho is always the most recent backup image so you could have a restore command line referencing ghost_A.gho
ie something like
ghost -clone,mode=prestore,src=2:2\ghost_A.gho:1,dst=1:1 -fx –sure
The backup images would be scheduled but the restore would not. You could have batch files to initiate the restore from DOS and also initiated from Windows,
If you want a dated and a timed folder for any purpose...
REM In regional settings, must have dd-mm-yy, not dd/mm/yy Short date.
REM Can have yy-mm-dd for USA. That's OK.
REM Create sub directory called \dd-mm-yy_hhmmss
REM where dd-mm-yy_hhmmss is a date_time stamp like 01-03-09_134200
set hh=%time:~0,2%
REM Since there is no leading zero for times before 10 am, have to put in
REM a zero when this is run before 10 am.
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set timestamp=%time:~0,8%
if @%timestamp:~0,1% == @ set timestamp=0%timestamp:~1,7%
set timestamp=%date:.=%_%timestamp::=%
echo.Timestamp :: %timestamp%
MD %timestamp%
I'm sure that would work, but maybe not for my situation.
I was going to make the images onto the FAT32 partition, so it's going to be an archive. Not a lot of files, maybe 7 or 8GB assuming 50% compression.
Thats why I was thinking folders might be easier.
If the filename can't be made to reflect the date, maybe the batch file can echo the date into a text file before making the image?
Dave
I avoid dated file and folders because I can't automatically restore the image. I need a fixed name. That's why I prefer something like Message #30. You can always see what date the image was created by looking in the Date Modified column.
You got a good point there, although I don't have a need for automated restores.
But thats another good reason for working with folders
I could CD into the current image folder and just do a: date>date.txt
For your friend you could have the backups automated. In DOS you could have your Choice Menu with Ghost_A, Ghost_B or Ghost_C restore choices. So she doesn't have to know anything about Ghost but she could restore an image.
LOL, she would have me do it.
I built the system for her years ago so I have kind of inherited it. I put radmin on it so when she had a problem she turns on radmin and I connect into it and fix it.
But she's an invaluable employee of mine, I actually just bought her a little pink eee and been getting that all setup for her.
She's going to bring her tower to work so i can setup a router and update the system.
DaveH wrote:LOL, she would have me do it.
So that's why you need to make it easy for the inevitable D-day. Makes sense.
You got a point there.
On this new EEE I haven't figured out what to do yet. I can't go with a scheduled image because I wouldn't want the netbook to be unused for a while and then go right into an image when it's turned on. I hate any kind of scheduled tasks on laptops because people turn them on when they want to use them and the last thing you want is a whole bunch of stuff trying to run.
I think I'll have to have it done manually with drive image or use the program I don't like but comes free with the hard drive.
I used to like Drive Image. I preferred it to DOS Ghost. Someone said, "Ghost is for people who like doing it the hard way".
Dave,
I used Virtual PC with Win7 and Ghost 2003. No problems with scheduled restores.