It is currently Wed Apr 24, 2024 7:39 pm

All times are UTC - 7 hours [ DST ]

Recent News:



Post new topic Reply to topic  [ 307 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21  Next
Author Message
PostPosted: Mon Jan 18, 2010 8:46 pm 
Offline
1.5TB storage
1.5TB storage

Joined: Fri Jan 08, 2010 4:03 pm
Posts: 82
Thanks: 9
Thanked: 2 times in 1 post
lol, thanks for the smack back to reality...i think ill just stick with robocopy and run the got darn thing already

one last question about
Quote:
And one last reminder... DO NOT CLOSE YOUR REMOTE SESSION WHEN THIS IS RUNNING as the script will terminate.


so when i RDP and run it, i cant close out the window? does that mean i have to leave my computer on? i thought if i X out the RDP window that whatever is running or transferring will still continue doing so unless you turn off the actual server

what about the scheduler? will that just run automatically? does this apply to that too?


Top
 Profile  
Thanks  

Attention Guest: Remove this ad by Registering with the MediaSmartServer.net Forums. It's Free!
PostPosted: Mon Jan 18, 2010 9:01 pm 
Offline
MVP/Moderator
MVP/Moderator
User avatar

Joined: Sat Dec 15, 2007 8:21 am
Posts: 4725
Location: Dutchess County, NY
Thanks: 77
Thanked: 273 times in 268 posts
If you "X" out of an RDP window you do leave the session open. But you may not be able to open another session as there is a severe limit on the numbers. You should ALWAYS LOG OUT of RDP sessions.

But if you log out the applications are all closed....

I suggest that during this time of trial/testing you should leave your client powered ON. Turn off the monitor but leave it on. And there is the added advantage of seeing any error messages that might occur when it is running.

If, after you have run this a few times manually, you want to save not only what is sent to the log file but ALSO any messages that would appear in the command window, you can use this little script:

Code:
EXTERNAL >"C:\WHS Backup Logs\LastBackup.log"


For this to work the name of the original script is ass-u-me-d to be "EXTERNAL". If you name it differently change the one-line script above accordingly.

--------

In the case of a SCHEDULED task running I have found that logging on (and the Console is an RDP session remember) is fine. The script continues. But subsequently logging OFF when the script is running generally terminates the script. (Took me a while to figure that one out!)

_________________
....JBick

EX475, 2 GB, LE-1640
PC1: Vista-->W7 Ultimate/32, (D-Drive RAID-5 Array)
PC2: Lenovo Laptop, Win XP Home SP3
2xLinksys WRT54G v1.1 and 2xNetGear GS105 Gbit switch


Top
 Profile  
Thanks  
PostPosted: Mon Jan 18, 2010 10:23 pm 
Offline
1.5TB storage
1.5TB storage

Joined: Fri Jan 08, 2010 4:03 pm
Posts: 82
Thanks: 9
Thanked: 2 times in 1 post
JohnBick wrote:
If you "X" out of an RDP window you do leave the session open. But you may not be able to open another session as there is a severe limit on the numbers. You should ALWAYS LOG OUT of RDP sessions.

But if you log out the applications are all closed....

I suggest that during this time of trial/testing you should leave your client powered ON. Turn off the monitor but leave it on. And there is the added advantage of seeing any error messages that might occur when it is running.

If, after you have run this a few times manually, you want to save not only what is sent to the log file but ALSO any messages that would appear in the command window, you can use this little script:

Code:
EXTERNAL >"C:\WHS Backup Logs\LastBackup.log"


For this to work the name of the original script is ass-u-me-d to be "EXTERNAL". If you name it differently change the one-line script above accordingly.

--------

In the case of a SCHEDULED task running I have found that logging on (and the Console is an RDP session remember) is fine. The script continues. But subsequently logging OFF when the script is running generally terminates the script. (Took me a while to figure that one out!)


if i X out of an RDP session and then later log back in with the same account, does that count as another session? or just re-continuing the original session which would be fine?

are the messages that appear in the command window not saved to the logs? what does the log file contain then?

what if you run the script, then X out and then turn off your computer and then go to bed and then go to work without ever turning back your computer on (and thus not RDPing into your MSS), will that be ok? cause ur not starting another session ever...prolly until way after the back up is done

and as for the scheduled task....when logged off completely, the script will run fine? what if ur logged on and Xed out and never log back in again....still fine, right?

i pretty much plan to be running this backup when im sleeping and not needing to log back in after i X out an RDP session. so im not sure if these log on/log off restrictions apply in this particular case....but either way it's good to know! just trying to clarify

about this...
Quote:
If you execute the script after the Sunday Morning backup window it will take a long time every SUNDAY.


what if you never run the backup on Sunday...do you avoid the long time then? or will it be long every time you run the backup for the first time after the sunday maintenance regardless of what day that might be?

sorry if im making ur head explode \:D/


Top
 Profile  
Thanks  
PostPosted: Tue Jan 19, 2010 11:39 am 
Offline
MVP/Moderator
MVP/Moderator
User avatar

Joined: Sat Dec 15, 2007 8:21 am
Posts: 4725
Location: Dutchess County, NY
Thanks: 77
Thanked: 273 times in 268 posts
Lazer, it is time for you to set this up, experiment with it and experience it. Some of your questions have already been answered, some are obvious and the others will quickly become clear.

_________________
....JBick

EX475, 2 GB, LE-1640
PC1: Vista-->W7 Ultimate/32, (D-Drive RAID-5 Array)
PC2: Lenovo Laptop, Win XP Home SP3
2xLinksys WRT54G v1.1 and 2xNetGear GS105 Gbit switch


Top
 Profile  
Thanks  
PostPosted: Tue Jan 19, 2010 12:00 pm 
Offline
1.5TB storage
1.5TB storage

Joined: Fri Jan 08, 2010 4:03 pm
Posts: 82
Thanks: 9
Thanked: 2 times in 1 post
JohnBick wrote:
Lazer, it is time for you to set this up, experiment with it and experience it. Some of your questions have already been answered, some are obvious and the others will quickly become clear.


lol. ive completely worn out your patience havent i

can you just answer all the questions from my last post and i PROMISE i will not post in this thread again? pretty please?


Top
 Profile  
Thanks  
PostPosted: Tue Jan 19, 2010 12:35 pm 
Offline
MVP/Moderator
MVP/Moderator
User avatar

Joined: Sat Dec 15, 2007 8:21 am
Posts: 4725
Location: Dutchess County, NY
Thanks: 77
Thanked: 273 times in 268 posts
Somehow I doubt that....

Lazer wrote:
if i X out of an RDP session and then later log back in with the same account, does that count as another session? or just re-continuing the original session which would be fine?

It counts as another session (which is why we should ALWAYS log off rather than just closing an RDP session).

Lazer wrote:
are the messages that appear in the command window not saved to the logs? what does the log file contain then?

Try it and see... RoboCopy has a provision for creating a log which is what is used. But screen messages are not included in that log. Xcopy does not create a log so the screen output is redirected to the log.

Lazer wrote:
what if you run the script, then X out and then turn off your computer and then go to bed and then go to work without ever turning back your computer on (and thus not RDPing into your MSS), will that be ok? cause ur not starting another session ever...prolly until way after the back up is done

I believe it stops on the exit -- but try it and see. (It's been a while since I tested that.)

Lazer wrote:
and as for the scheduled task....when logged off completely, the script will run fine?

The script WILL run from the scheduler when there is no RDP session (or active console session).

Lazer wrote:
what if ur logged on and Xed out and never log back in again....still fine, right?

I believe this is covered in the last two questions/answers.

Lazer wrote:
i pretty much plan to be running this backup when im sleeping and not needing to log back in after i X out an RDP session. so im not sure if these log on/log off restrictions apply in this particular case....but either way it's good to know! just trying to clarify

As I said before... If you initiate it manually do not disconnect while it's running.

Lazer wrote:
about this...
Quote:
If you execute the script after the Sunday Morning backup window it will take a long time every SUNDAY.


what if you never run the backup on Sunday...do you avoid the long time then? or will it be long every time you run the backup for the first time after the sunday maintenance regardless of what day that might be?

The database cleanup occurs during a maintenance window around midnight on Sunday. You can not change that schedule. The only way to turn off the Sunday CLIENT backups is to either disable backups for all the clients or turn off the clients AND not allow them to be awakened for the backups. If you cj\hoose not to run the SERVER (automated) backup on Sunday then all the comments I made about Sunday apply to Monday -- the next time it runs.

_________________
....JBick

EX475, 2 GB, LE-1640
PC1: Vista-->W7 Ultimate/32, (D-Drive RAID-5 Array)
PC2: Lenovo Laptop, Win XP Home SP3
2xLinksys WRT54G v1.1 and 2xNetGear GS105 Gbit switch


Top
 Profile  
Thanks  
The following user would like to thank JohnBick for this post
Lazer
PostPosted: Tue Jan 19, 2010 1:56 pm 
Offline
Founder
Founder
User avatar

Joined: Tue Jul 31, 2007 11:54 am
Posts: 10735
Location: Fort Collins, Colorado
Thanks: 630
Thanked: 931 times in 885 posts
JohnBick wrote:
Somehow I doubt that....


:spit:

_________________
Alex Kuretz
Remote Notification: Monitoring and alerting for your Home Server via email, Twitter, text message, RSS, push notifications, and on your Mac desktop
Have you tried our Add-Ins?


Top
 Profile  
Thanks  
The following user would like to thank yakuza for this post
Lazer
PostPosted: Tue Jan 19, 2010 7:36 pm 
Offline
1.5TB storage
1.5TB storage

Joined: Fri Jan 08, 2010 4:03 pm
Posts: 82
Thanks: 9
Thanked: 2 times in 1 post
haha, ok so im posting here again BUT its to provide knowledge and an update and its filled with ZERO questions so i don't really consider my promise broken....

anyway, did a test run, you CAN X out of an RDP session after you start the script because the process still runs in the background. but not only that, if you just copy the command line prompt in the script into command prompt, the window stays open and doesn't close out automatically so when you log back in later, all the command prompt logs are still there and open in the window.

secondly, there is one edit you should add to page 1. on your first run thru, a C:\WHS Backup Logs\ doesn't exist on the drive yet so thus, the script fails to execute. I fixed this by manually creating the directory and then just creating an empty txt doc and renaming it External-Shares.log. robocopy seems to look for this log file to compare it before it runs.

anyways, it worked like a charm! gonna run the real deal before bed tonight!

THANK YOU Mr Bick. between this thread and that system drive thread, you are really an amazing individual who has a ton of patience and a noble knack for helping complete strangers with any and all of their problems. i have great respect for you and thanks for all the advice, help, patience and successful tips.


Top
 Profile  
Thanks  
The following user would like to thank Lazer for this post
JohnBick, yakuza
PostPosted: Tue Jan 19, 2010 9:20 pm 
Offline
MVP/Moderator
MVP/Moderator
User avatar

Joined: Sat Dec 15, 2007 8:21 am
Posts: 4725
Location: Dutchess County, NY
Thanks: 77
Thanked: 273 times in 268 posts
Lazer wrote:
anyway, did a test run, you CAN X out of an RDP session after you start the script because the process still runs in the background.

Do NOT count on this to always be the case.

Lazer wrote:
but not only that, if you just copy the command line prompt in the script into command prompt, the window stays open and doesn't close out automatically so when you log back in later, all the command prompt logs are still there and open in the window.

Of course... But be sure to do all the other steps...

Lazer wrote:
secondly, there is one edit you should add to page 1. on your first run thru, a C:\WHS Backup Logs\ doesn't exist on the drive yet so thus, the script fails to execute. I fixed this by manually creating the directory and then just creating an empty txt doc and renaming it External-Shares.log. robocopy seems to look for this log file to compare it before it runs.

I will add the step to create the directory (I thought it was already in the post -- may be I did that on another board and forgot to do it here. Thanks...

If the documents are not there for the renames there will be a set of error messages. Just ignore them and they will go away, one at a time with each successive run.

Lazer wrote:
anyways, it worked like a charm! gonna run the real deal before bed tonight!

THANK YOU Mr Bick. between this thread and that system drive thread, you are really an amazing individual who has a ton of patience and a noble knack for helping complete strangers with any and all of their problems. i have great respect for you and thanks for all the advice, help, patience and successful tips.

Thank-you!

_________________
....JBick

EX475, 2 GB, LE-1640
PC1: Vista-->W7 Ultimate/32, (D-Drive RAID-5 Array)
PC2: Lenovo Laptop, Win XP Home SP3
2xLinksys WRT54G v1.1 and 2xNetGear GS105 Gbit switch


Top
 Profile  
Thanks  
PostPosted: Sat Jan 23, 2010 3:21 am 
Offline
Newbie
Newbie

Joined: Thu Sep 24, 2009 3:36 pm
Posts: 2
Thanks: 0
Thanked: 0 time in 0 post
JohnBick wrote:
Future Plans

In the near future I will post an expanded version of this script that uses TrueCrypt to encrypt the target drive and add additional protection for the off-site storage of the backup. When I do that I will edit this post and add a link to that thread here.


I'm still very keen to see these steps added to your script. It looks like life might have gotten in the way of completing that :). From reading your recent posts, it sounds like you've git this up and working in your own backup script - any chance of sharing the script you use? I realize it would need to be modified to meet others' needs, but the script you use would be a great starting point.

Thanks!


Top
 Profile  
Thanks  
PostPosted: Sat Jan 23, 2010 12:35 pm 
Offline
MVP/Moderator
MVP/Moderator
User avatar

Joined: Sat Dec 15, 2007 8:21 am
Posts: 4725
Location: Dutchess County, NY
Thanks: 77
Thanked: 273 times in 268 posts
redgum wrote:
JohnBick wrote:
Future Plans

In the near future I will post an expanded version of this script that uses TrueCrypt to encrypt the target drive and add additional protection for the off-site storage of the backup. When I do that I will edit this post and add a link to that thread here.


I'm still very keen to see these steps added to your script. It looks like life might have gotten in the way of completing that :). From reading your recent posts, it sounds like you've git this up and working in your own backup script - any chance of sharing the script you use? I realize it would need to be modified to meet others' needs, but the script you use would be a great starting point.

Thanks!

The "guts" of that were posted some time ago at:http://www.mediasmartserver.net/forums/viewtopic.php?p=24710#p24710. There are a couple folks around here that have been using that!

Here is an integrated copy of the script from the beginning of this thread with the encryption incorporated. Please note that the drive letters and a few other "basics" may be a bit different in this version as compared to the one at the top of this thread. This version has RoboCopy enabled -- but the Xcopy commands are "REMed" (remarked) out.

I use this with the ENTIRE target disk encrypted. (You will understand that when you read the TrueCrypt documentation if you haven't already.)

Code:
REM Windows Home Server encrypted backup of backup folder and then shares folder

REM (C) 2008 www.HomeAutomation-Direct.com - Modified by JohnBick December 2008, Jan 2009, May 2009
REM Released under GPL. No consequential loss or damages accepted.  Use at your own risk!
REM WHS will complain if the services are stopped for too long!

REM ------------------

REM Mount the TrueCrypt container on T: No user output
"C:\Program Files\TrueCrypt\TrueCrypt.exe" /V \Device\Harddisk4\Partition1 /L T /P "LongPasswordHere" /Q /S

REM Exit here if there was an error in the mount...
IF errorlevel 1 Exit

REM -------------------

REM Copy the WHS CLIENT BACKUP Database

REM Stop the Drive Letter Service
NET STOP PDL

REM Stop the Backup Service
NET STOP WHSBackup

REM Select one copy method OR the other below.

REM ROBOCopy the "backup" folder in Mirror Mode, Restartable, All attributes, No progress, 4 retries, 5 second wait between retries, Log to file, Console output
Robocopy D:\folders\{00008086-058D-4C89-AB57-A7F909A47AB4} T:\Backups\{00008086-058D-4C89-AB57-A7F909A47AB4} /MIR /Z /COPYALL /NP /R:4 /W:5 /LOG:"C:\WHS Backup Logs\External-Backups.log" /TEE

REM Copy the "backup" folder
REM XCopy D:\folders\{00008086-058D-4C89-AB57-A7F909A47AB4} T:\Backups\{00008086-058D-4C89-AB57-A7F909A47AB4} /D /E /V /C /I /G /H /R /K /X /Y >"C:\WHS Backup Logs\External-Backups.log"

REM Start the Backup Service
NET START WHSBackup

REM Start the Drive Letter Service
NET START PDL 

REM -------------------

REM Rename the log files to save last TEN (0-9)

erase  "C:\WHS Backup Logs\External-Backups-9.log"
rename "C:\WHS Backup Logs\External-Backups-8.log"  External-Backups-9.log
rename "C:\WHS Backup Logs\External-Backups-7.log"  External-Backups-8.log
rename "C:\WHS Backup Logs\External-Backups-6.log"  External-Backups-7.log
rename "C:\WHS Backup Logs\External-Backups-5.log"  External-Backups-6.log
rename "C:\WHS Backup Logs\External-Backups-4.log"  External-Backups-5.log
rename "C:\WHS Backup Logs\External-Backups-3.log"  External-Backups-4.log
rename "C:\WHS Backup Logs\External-Backups-2.log"  External-Backups-3.log
rename "C:\WHS Backup Logs\External-Backups-1.log"  External-Backups-2.log
rename "C:\WHS Backup Logs\External-Backups-0.log"  External-Backups-1.log
rename "C:\WHS Backup Logs\External-Backups.log"    External-Backups-0.log

REM Backup Database backed up, backup service has been restarted, and logs saved

REM -------------------

REM Backup the WHS SHARES folder

REM Select one copy method OR the other below.

REM Copy the “shares” folder in Mirror Mode, Restartable, All attributes, No progress, 4 retries, 5 second wait between retries, Log to file, Console output
Robocopy D:\shares T:\Shares /MIR /Z /COPYALL /NP /R:4 /W:5 /LOG:"C:\WHS Backup Logs\External-Shares.log" /TEE

REM Copy the WHS Shared Folders
REM XCopy D:\shares T:\Shares /D /E /V /C /I /G /H /R /K /X /Y >"C:\WHS Backup Logs\External-Shares.log"

REM -------------------

REM Rename the log files to save last TEN (0-9)

erase  "C:\WHS Backup Logs\External-Shares-9.log"
rename "C:\WHS Backup Logs\External-Shares-8.log"  External-Shares-9.log
rename "C:\WHS Backup Logs\External-Shares-7.log"  External-Shares-8.log
rename "C:\WHS Backup Logs\External-Shares-6.log"  External-Shares-7.log
rename "C:\WHS Backup Logs\External-Shares-5.log"  External-Shares-6.log
rename "C:\WHS Backup Logs\External-Shares-4.log"  External-Shares-5.log
rename "C:\WHS Backup Logs\External-Shares-3.log"  External-Shares-4.log
rename "C:\WHS Backup Logs\External-Shares-2.log"  External-Shares-3.log
rename "C:\WHS Backup Logs\External-Shares-1.log"  External-Shares-2.log
rename "C:\WHS Backup Logs\External-Shares-0.log"  External-Shares-1.log
rename "C:\WHS Backup Logs\External-Shares.log"    External-Shares-0.log

REM Shared Folders backed up and logs saved

REM -------------------

REM Dismount the TureCrypt container
"C:\Program Files\TrueCrypt\TrueCrypt.exe" /D /Q /S


And you are correct, life HAS been getting in the way. What I want to do is to document all the steps for setting this up -- with screen shots, etc. Got started, then sidetracked... Keeps happening!

_________________
....JBick

EX475, 2 GB, LE-1640
PC1: Vista-->W7 Ultimate/32, (D-Drive RAID-5 Array)
PC2: Lenovo Laptop, Win XP Home SP3
2xLinksys WRT54G v1.1 and 2xNetGear GS105 Gbit switch


Top
 Profile  
Thanks  
PostPosted: Thu Mar 04, 2010 8:32 pm 
Offline
Newbie
Newbie

Joined: Wed Oct 07, 2009 8:49 pm
Posts: 6
Thanks: 0
Thanked: 0 time in 0 post
I plan to use a script of this nature to backup to a shared drive on a different computer. The computer and server are wired to the same gigabit switch, so bandwidth should be okay.

I let the target computer sleep. WOL is enabled. Does anyone have any comments about using a command-line WOL utility to wake up the target? An example can be found here: http://www.depicus.com/wake-on-lan/wake-on-lan-cmd.aspx.

Running that command line requires inserting a pause in the script until the target is awake and reactive. Otherwise the script will attempt to proceed with the backup but no destination exists. Can anyone suggest how to do that? Perhaps a loop to check for a known file in the destination share, and do while errorlevel<>0?

Thanks in advance.

Chris


Top
 Profile  
Thanks  
PostPosted: Wed Mar 10, 2010 6:57 pm 
Offline
1.5TB storage
1.5TB storage
User avatar

Joined: Tue Mar 09, 2010 8:58 am
Posts: 97
Location: Pacific NW, USA
Thanks: 36
Thanked: 8 times in 8 posts
Thank you for pointing me to this, I will need some time to read through it all :)

Off hand, I do have a question regarding some of the coding as seen in previous threads:

Code:
REM Copy the WHS Shared Folders
XCopy D:\shares E:\Shares /D /E /V /C /I /G /H /R /K /X /Y >"C:\WHS Backup Logs\External-Shares.log"

In the above example, what is the following doing? /D /E /V /C /I /G /H /R /K /X /Y

Ok back to reading!

_________________
Have you backed up your data lately?


Top
 Profile  
Thanks  
PostPosted: Wed Mar 10, 2010 9:53 pm 
Offline
MVP/Moderator
MVP/Moderator
User avatar

Joined: Sat Dec 15, 2007 8:21 am
Posts: 4725
Location: Dutchess County, NY
Thanks: 77
Thanked: 273 times in 268 posts
chriscowles wrote:
Running that command line requires inserting a pause in the script until the target is awake and reactive. Otherwise the script will attempt to proceed with the backup but no destination exists. Can anyone suggest how to do that? Perhaps a loop to check for a known file in the destination share, and do while errorlevel<>0?

From a post by Cougar in Dec '08: "To get the delay in your batchfile, you can use sleep from the resource kit (http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en)".

I am thinking there was another way as well...

_________________
....JBick

EX475, 2 GB, LE-1640
PC1: Vista-->W7 Ultimate/32, (D-Drive RAID-5 Array)
PC2: Lenovo Laptop, Win XP Home SP3
2xLinksys WRT54G v1.1 and 2xNetGear GS105 Gbit switch


Top
 Profile  
Thanks  
PostPosted: Wed Mar 10, 2010 9:55 pm 
Offline
MVP/Moderator
MVP/Moderator
User avatar

Joined: Sat Dec 15, 2007 8:21 am
Posts: 4725
Location: Dutchess County, NY
Thanks: 77
Thanked: 273 times in 268 posts
TAdams wrote:
... what is the following doing? /D /E /V /C /I /G /H /R /K /X /Y

Rather than trying to repeat it all here, open a command prompt and enter "XCOPY /?" to see the XCOPY help information. These (and others) will be explained in some detail!

_________________
....JBick

EX475, 2 GB, LE-1640
PC1: Vista-->W7 Ultimate/32, (D-Drive RAID-5 Array)
PC2: Lenovo Laptop, Win XP Home SP3
2xLinksys WRT54G v1.1 and 2xNetGear GS105 Gbit switch


Top
 Profile  
Thanks  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 307 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21  Next

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group