SageTV Community  

Go Back   SageTV Community > General Discussion > The SageTV Community
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

The SageTV Community Here's the place to discuss what's worth recording, HTPC deals at retail stores, events happening outside of your home theater, and pretty much anything else you'd like. (No For-Sale posts)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-15-2010, 12:18 PM
IVB's Avatar
IVB IVB is offline
Sage Icon
 
Join Date: Sep 2003
Location: Oak-town, CA
Posts: 1,083
Automated Windows copy Scheduled task?

Boy I feel like a dumbass after using PCs since 1983, but I can't figure out how to copy an entire directory via the command prompt in WHS. (I'm trying to create a scheduled task to do this.)

I tried
Quote:
copy "C:\program files\Sagetv" \\backup-machine\backup\WHS
but it says it can't find the file specified. I tried adding a *.* to no avail. I then tried manually doing it, even by switching to the correct folder then doing a copy *.*, and that's not it either.

I tried changing the destination to a local drive just to get the formatting right, and that isn't it either. There's other stuff i've tried, but now i'm randomly doing stuff

Google shows people doing what i'm doing, so I have no idea what i'm doing wrong.
__________________
------------------------------------
My Home Automation YouTube channel
Reply With Quote
  #2  
Old 02-15-2010, 12:29 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Quote:
Originally Posted by IVB View Post
Boy I feel like a dumbass after using PCs since 1983, but I can't figure out how to copy an entire directory via the command prompt in WHS. (I'm trying to create a scheduled task to do this.)

I tried

but it says it can't find the file specified. I tried adding a *.* to no avail. I then tried manually doing it, even by switching to the correct folder then doing a copy *.*, and that's not it either.

I tried changing the destination to a local drive just to get the formatting right, and that isn't it either. There's other stuff i've tried, but now i'm randomly doing stuff

Google shows people doing what i'm doing, so I have no idea what i'm doing wrong.
copy "C:\program files\Sagetv\*.* /s" Some drive letter:\backup\WHS


I believe the copy command will not like UNC paths so you will need to map a drive. The *.* /s tells it all the files in the SageTV directory and /s twlls it to also copy subdirectories and files within the SageTV folder.

You may want to look at robocopy for a more sophisicated commandline tool. Also robogeek had already created a SageTV Backup script for WHS which is here.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #3  
Old 02-15-2010, 12:30 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
I think you're looking for 'xcopy /S' or 'xcopy /E'
Reply With Quote
  #4  
Old 02-15-2010, 12:30 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Use xcopy for copying whole directories (including subdirectories).
__________________
-- Greg
Reply With Quote
  #5  
Old 02-15-2010, 12:40 PM
IVB's Avatar
IVB IVB is offline
Sage Icon
 
Join Date: Sep 2003
Location: Oak-town, CA
Posts: 1,083
ah, the /s is what i was missing, it wasn't finding any files in ..\SageTV so it died. Looking into robogeeks backup automated routine now, thanks for that link.
__________________
------------------------------------
My Home Automation YouTube channel
Reply With Quote
  #6  
Old 02-15-2010, 04:02 PM
SWKerr SWKerr is offline
Sage Icon
 
Join Date: Jun 2008
Posts: 1,178
Not sure what you are trying to do exactly but I suspect you are backing stuff up to a separate locations. I use SyncToy 2.1 to copy backups of select folders to a drive that is not in the pool. It can easily be scheduled to run at any interval you like. SyncToy is from Microsoft and is free. The benefit of SyncToy is that it will only copy the changes.

Don't forget to backup the Sage wiz.bin as well. I have a *.bat file scheduled to run every night that will reset SageTV and backup the wiz.bin file. It uses utility called devcon to restart the SageTV service as well as resetting the HD-PVR devices. (attached if interested.)


"
Attached Files
File Type: txt SageBackup.bat.txt (1.2 KB, 302 views)
Reply With Quote
  #7  
Old 02-15-2010, 04:23 PM
IVB's Avatar
IVB IVB is offline
Sage Icon
 
Join Date: Sep 2003
Location: Oak-town, CA
Posts: 1,083
Does one really need to stop the SageTV service before doing the copy?

I just set up a simple xcopy of \programfiles\sagetv to a different machine at 3am every sat morning. It runs pretty fast, so I don't mind a non-incremental copy. I tried running robogeek's script, but it was throwing errors. Plus it's way more than I need (I think), so I just stuck with that simple xcopy command.
__________________
------------------------------------
My Home Automation YouTube channel
Reply With Quote
  #8  
Old 02-15-2010, 04:35 PM
SWKerr SWKerr is offline
Sage Icon
 
Join Date: Jun 2008
Posts: 1,178
The restart of the SageTV service is really about stability and the HD-PVRs. You shouldn't really need to stop it for a decent backup.

My WHS can go for months without a reboot. I started the reset when I seup the automatic backups in hopes to improve stability. (was not a significant problem before) I have not missed a recording since I started the SageTV and HD-PVR daily reset.
Reply With Quote
  #9  
Old 02-15-2010, 04:49 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by IVB View Post
Does one really need to stop the SageTV service before doing the copy?

I just set up a simple xcopy of \programfiles\sagetv to a different machine at 3am every sat morning. It runs pretty fast, so I don't mind a non-incremental copy. I tried running robogeek's script, but it was throwing errors. Plus it's way more than I need (I think), so I just stuck with that simple xcopy command.
There's certainly nothing wrong with the solutions mentioned here and I've used some of them before myself, but if you decide you want incremental backups, as well as full backups, which are automatically deleted after a certain number of days/weeks/months, you might want to look at something like Cobian Backup (free). This could also help when you decide you have additional directories under WHS which you would like to have the same backup solution for. I use this for any "non-standard" programs I've installed on my WHS box. Personally, I keep backups going back several months, so that I have access to the historical changes I've made and can pick and choose what to restore from and/or reference when I find something has suddenly broken (thankfully, this has yet to happen).

Again, this might be overkill for your needs, but I figured I'd mention it.
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #10  
Old 02-15-2010, 05:12 PM
sic0048 sic0048 is offline
Sage Icon
 
Join Date: Nov 2007
Posts: 1,400
What is a good way restart HD-100 extenders after resetting the SageTV service? Once they loose the connection to the Sage server, they must be restarted to reconnect.

I think there are some scripts floating around, but I don't see them now (haven't looked very hard however).
__________________
i7-6700 server with about 10tb of space currently
SageTV v9 (64bit)
Ceton InfiniTV ETH 6 cable card tuner (Spectrum cable)
OpenDCT
HD-300 HD Extenders (hooked to my whole-house A/V system for synched playback on multiple TVs - great during a Superbowl party)
Amazon Firestick 4k and Nvidia Shield using the MiniClient
Using CQC to control it all
Reply With Quote
  #11  
Old 02-16-2010, 08:31 AM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Quote:
Originally Posted by sic0048 View Post
What is a good way restart HD-100 extenders after resetting the SageTV service? Once they loose the connection to the Sage server, they must be restarted to reconnect.

I think there are some scripts floating around, but I don't see them now (haven't looked very hard however).
Hm, mine reconnects automatically...?
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #12  
Old 02-16-2010, 08:44 AM
sic0048 sic0048 is offline
Sage Icon
 
Join Date: Nov 2007
Posts: 1,400
I found the script program. Shadeblue.com created a utility call SageExtCtrl that should work nicely. I had looked at it before, but never tried it out. Now that I set my parents up with a Sage system, I really need to get their extenders to restart automatically should the computer be rebooted for some reason. I'm tired of getting those "The Sage isn't working" phone calls
__________________
i7-6700 server with about 10tb of space currently
SageTV v9 (64bit)
Ceton InfiniTV ETH 6 cable card tuner (Spectrum cable)
OpenDCT
HD-300 HD Extenders (hooked to my whole-house A/V system for synched playback on multiple TVs - great during a Superbowl party)
Amazon Firestick 4k and Nvidia Shield using the MiniClient
Using CQC to control it all
Reply With Quote
  #13  
Old 09-26-2010, 01:22 AM
infocus13's Avatar
infocus13 infocus13 is offline
Sage Advanced User
 
Join Date: Aug 2007
Posts: 199
Hey guys

sorry to resurrect an old thread but I'm having issues using SyncToy 2.1 to backup sagetv...

For some reason ST errors when copying about 90 JARs and wiz.bin.... it says it cannot read the files at the source b/c they are used by another program.

Anyone know why this is? Using xcopy also hangs at copying the files in the active-MQ/Ortus directory (I think the files are called data-control, etc)

Any ideas? Im running Win7, UAC switched off.

Thanks!
Reply With Quote
  #14  
Old 09-27-2010, 01:34 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Quote:
Originally Posted by dkatchalov View Post
Hey guys

sorry to resurrect an old thread but I'm having issues using SyncToy 2.1 to backup sagetv...

For some reason ST errors when copying about 90 JARs and wiz.bin.... it says it cannot read the files at the source b/c they are used by another program.

Anyone know why this is? Using xcopy also hangs at copying the files in the active-MQ/Ortus directory (I think the files are called data-control, etc)

Any ideas? Im running Win7, UAC switched off.

Thanks!
Because you left Sage still running. It will usually keep some files open when running.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #15  
Old 09-27-2010, 07:11 PM
infocus13's Avatar
infocus13 infocus13 is offline
Sage Advanced User
 
Join Date: Aug 2007
Posts: 199
Quote:
Originally Posted by gplasky View Post
Because you left Sage still running. It will usually keep some files open when running.

Gerry
Thanks Gerry.... so I can't backup sage if it is running? Seems weird.... how come I can use windows copy (via windows explorer) to copy / backup Sage once it is still running?

cheers
Reply With Quote
  #16  
Old 09-28-2010, 09:11 AM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Usually open files cannot just be copied. Now a true backup program may be able to copy open files. And it may depend at what time you copied Sage via windows copy and what the program was doing. And did you verify that all the fies were copied over? I mean Sync Toy is telling you exactly what the error is. And if you left xcopy running long enough it would probably give you an error about the file being open.


Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.

Last edited by gplasky; 09-28-2010 at 09:15 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Repair - Windows Task Manager scat The SageTV Community 1 04-22-2009 06:30 PM
"There are no scheduled recordings..." and Windows 7 banshee SageTV Software 1 02-13-2009 12:43 PM
Possible to run scheduled task without cmd window opening? popechild General Discussion 3 06-05-2007 06:05 PM
Scheduled Windows Restart / Reboot (Shutdown -r) and Sage doesn't restart dealsdyker SageTV Software 8 03-09-2007 04:24 PM
running epg of windows scheduled task... doron_amedey SageTV Software 5 09-14-2005 03:03 PM


All times are GMT -6. The time now is 09:41 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.