|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
|||
|
|||
Are you running the script under a user account that has at least read access to the Program Files directory and read/write access to the Software share? If so, can you post any specific error messages so I can see what the exact error is and possibly what files or directory it's erring on? Also, be sure to execute the script from the scripts root directory. Any shortcuts or scheduled tasks should have the 'Working Directory' or 'Start In' directory set to the same directory the scripts are located in.
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#22
|
||||
|
||||
Quote:
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333 Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID Capture: HDHomerun Prime, HDHomerun x 2 Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi) Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300 |
#23
|
|||
|
|||
So for the people that have sagetv on a different drive, we can just edit the backup files to change it?
|
#24
|
|||
|
|||
That is correct. Just change the SageTVDir variable near the top of each script to point to your SageTV installation folder. Be sure to set it to the root installation folder and not the SageTV executable root folder. The root installation folder will be the one that has the Common and SageTV subfolders.
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#25
|
|||
|
|||
Easy to set up and works great
Hi Jason,
Thanks for sharing your work, it works great on my WHS Suggestion: Would it be safer for the scripts to stop the SageTV service during backup to prevent Sage from accessing/modifying files during the backup? Rob |
#26
|
||||
|
||||
Jason, attached is the error I'm getting. I'm running this from the Admin account on the WHS box. When it's done there isn't anything in the backup folder. Thanks!
__________________
Server: AMD Phenom II X6 1090T 3.2GHz, ASRock 890FX Deluxe4 890FX, PNY Optima 8GB DDR3 1333 Media Storage: Rosewill RSV-S4-X 4 Bay Enclosure w/ 4 x 3TB via unRAID Capture: HDHomerun Prime, HDHomerun x 2 Software: Sage Server 7.1.9 on Windows 7 (Virtualized in ESXi) Clients: i3-2105, ASRock Z68 Pro3-M, 4GB DDR3 1600, 64GB SATA III (OS), 2TB WD Green (Recording), PNY GT 430 // 2 x HD-300 |
#27
|
|||
|
|||
Quote:
Double check the Security tab of the Scheduled Task you set, be sure you have the Administrators group added and be sure the Administrators group has all available check boxes checked under the Allow column. Other than that, the only other thing I can suggest would be to check the permissions of "D:\SageTV Backup Temp" and "D:\shares\Software\SageTV Backups" and its subdirectories. Use Windows Explorer to check each directory to be sure the permissions on those directories are properly set for Full Access for the Adminstrators group and that none of the directories are set with the read-only attribute.
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#28
|
|||
|
|||
Updated scripts
Attachment 10028Love these scripts you provided RoboGeek - nice work!
I took your hard work and massaged it a bit so that: - Allows you to place the script(s) on a secondary backup drive where ever you want the backups to go and run without modifying the scripts - Removed the need to set some other unnecessary variables. zip.exe and forfiles.exe just need to be in the same directory as the backup script. - For the manual backup, the version of SageTV is extracted from the registry, so no need to pass the version parameter when doing a MANUAL backup.* - combined the 3 separate scripts into one script so you only need to set variables in (or manage) one file. Simply pass a parameter to do a CONFIG WEEKLY or MANUAL backup, e.g.: SAGETV-BACKUP CONFIG However, I've also included the 3 modified script in the event one still wants them broken out into 3 separate files. - append to a SAGETV Backups.log file when backups are executed - Because I want to take a "backup of the backup" (yeah, I know...I like a second copy of the last backup to a removeable CF card), I've allowed for a "post processing" script. If a POSTBACKUP.CMD script in the same directory, it will be called (with the same passed backup parameter) after a successful backup. I've included my POSTBACKUP.CMD in the attached zip that doesn't do anything - my commands are REM'd out. A representative directory listing for the backup target looks like this: V:\SAGETV BACKUPS\When modifying the script to suit your own environment, the same instructions apply. The variables to be set I've made left-justified to make it easier to identify the settings to be reviewed. Simply review the SET variables that exist below the :BEGIN label. All other lines that are indented need not be modified.sagetv-backup.cmd To distinguish my version from the original versions by RoboGeek, my scripts use the .CMD extension instead of .BAT *I'm not sure if the registry reference is the same for different versions of SageTV. I'd appreciate it if someone could confirm that the following registry key is the same for a non-6.6.2 version of SageTV: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\F5CF942D133B1C747A31CE8714DA8D6F\InstallProperties\[DisplayVersion] Last edited by BKeadle; 04-12-2010 at 10:35 AM. |
#29
|
||||
|
||||
I took a different path and decided on using "pushd" and "popd" which makes it work no matter what drive they are on.
__________________
Production SageTV Server: ASUS P8P67-Pro, 16gb RAM, Crucial m4 256GB SSD, Unbunto 16.4.04 LTS (Server x64), WDC Red 4TB Capture: 1x HDHR Prime, 1x HDHomeRun (ClearQAM) Clients: 1x HD300, 2x HD200, 2x Placeshifters |
#30
|
|||
|
|||
I tried the ones from bkeadle. My weekly backup fails:
Setting temp folder name = SageTV Full Backup (07-16-2010 1100PM) Backing up SageTV Common directory... Backing up SageTV directory... Backing up Irremote.ini file... Backing up manually defined files... ...Backing up c:\Program Files\SageTV\SageTV\*.frq ...Backing up c:\ProgramData\LM Gestion\LM Remote KeyMap\*.xml Cleaning up old backups... Compressing backup: SageTV Full Backup (07-16-2010 1100PM) zip I/O error: Invalid argument zip error: Input file read failure (was zipping SageTV/cache/imagefactory/v7phoe nix/099c8465247ee34fb151b50b6990e498.png) Keeping compressed backup... Deleting backup directory: SageTV Full Backup (07-16-2010 1100PM) Failed to create C:\SageTV Backups\\SageTV Full Backup (07-16-2010 1100PM).zip Out of disk space? Volume in drive C has no label. Volume Serial Number is B0C9-DD1F Directory of C:\SageTV Backups 07/16/2010 10:20 PM 22,950,383 SageTV Config Backup (07-16-2010 1020PM). zip 1 File(s) 22,950,383 bytes 0 Dir(s) 402,830,938,112 bytes free Press any key to continue . . . |
#31
|
|||
|
|||
I noticed the zip.exe was quite old (2.32) so I upgraded to 3.0 and reran, and that seemed to fix it. Took me a while to find the new infozip...this worked:
ftp://ftp.info-zip.org/pub/infozip/win32/zip300xn.zip there is also a 64 bit version: ftp://ftp.info-zip.org/pub/infozip/w...p300xn-x64.zip |
#32
|
|||
|
|||
Thanks for putting these together, great tools!
Manual backup is backing up my entire windows directory, giving me a 1.5gb zip file. I know there's a simple fix to the batch file, but I can't put my finger on it here's the part of the batch file that lists the directories it's looking at, which I believe I left untouched from the original. There is no irrremote file in my windows directory, not even sure what that is. Can I just delete that line, is that the problem? REM SageTVDir = your SageTV install directory SET SageTVDir=C:\Program Files\SageTV REM backupDir = where you want the backup .zip files for weekly backups stored SET backupDir=D:\shares\Software\SageTV Backups\Full (manual backups) REM backupTempDir = where you want temp files to be stored before being zipped SET backupTempDir=D:\SageTV Backup Temp REM windowsDir = where the irremote.ini file is stored (not everybody has or needs this) SET windowsDir=C:\WINDOWS REM zipexeDir = where the zip.exe zipping program is located SET zipexeDir=D:\shares\Software\SageTV Backups
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend 4 Nvidia Shield TVs with Miniclient |
#33
|
|||
|
|||
I'm not sure what would cause it to copy the whole Windows directory. Here are the lines further down in the batch file that process the irremote.ini file:
Code:
ECHO Backing up Irremote.ini file... COPY "%windowsDir%\Irremote.ini" "%backupTempDir%\%folderName%" Code:
REM ECHO Backing up Irremote.ini file... REM COPY "%windowsDir%\Irremote.ini" "%backupTempDir%\%folderName%"
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#34
|
|||
|
|||
READ THIS IF YOU ARE USING THESE SCRIPTS WITH SAGETV V7!
While it's fresh in my mind, the sagetv-config-backup script isn't fully compatible with SageTV v7 and may cause problems with the plugins installed using the plugin manager if you restore one of these config backups. The plugin manager uses an additional properties file (filetracker.properties and filetracker.properties.autobackup) and some plugins store additional properties and other information in their own folders. The plugin manager stores info in the SageTV main properties file as well as the filetracker properties file. If these properties files get out of sync, it may cause issues with plugins failing, failing to uninstall, or failing to install. I'm not sure what kind of sanity checks the plugin manager has to prevent these possible situations, so please be careful restoring configuration backups. The weekly and manual backups should catch everything, but the additional files and folders would have to be added to the sagetv-config-backup script to ensure things don't go bad when restoring configuration backups. I'll try to get these incorporated along with some of the great additions others have added to the original scripts.
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#35
|
|||
|
|||
REM'ed out those two lines, no effect. I watched it all the way through this time, and the only thing that looked out of whack were a bunch of "zip permission denied" messages. In the end, it still made a backup of the entire windows directory. could this have anything to do with admin rights or something? (yes I am logged into whs as admin)
I cannot for the life of me figure out why it won't focus on the sage directory. If there's no answer, I guess I need to find a different backup solution.
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend 4 Nvidia Shield TVs with Miniclient |
#36
|
|||
|
|||
Quote:
If that isn't the problem, post the .bat file here and let me know how you are starting the .bat file and I'll test it out to see if I can duplicate your results.
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#37
|
|||
|
|||
Also, are you using the .BAT, or my .CMD version? If we could see the script you're running, it'd help.
You could also add this to the .BAT file just after the @echo off line: Code:
cd /d %~dp0 |
#38
|
|||
|
|||
gonna feel real stupid if this is the problem but i've just been double clicking the bat file. i never set up tasks because iwas just doing it manually to see how things worked. is that not the way the manual backup is intended to be kicked off?
i did just d/l frsh versions of the whs scripts, left them untouched and got the same result. i will upload later when i have a chance, out and about for the day. thx for the efforts
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend 4 Nvidia Shield TVs with Miniclient |
#39
|
|||
|
|||
Quote:
If you downloaded the WHS version of the scripts, did you unzip the file to the Software share (d:\shares\Software)? The WHS scripts expect to be extracted (keeping the zip folder sturcture intact) to the Software share and should work without requiring any mods to the scripts. Double check the user defined directories in the beginning of the script and be sure they are correct and that they actually exist on the hard drive. The only difference between the WHS and standard Windows version of the scripts is the fact that the WHS scripts were pre-moded to work from the Software share so WHS users wouldn't have to touch anything in the .bat files so they should work if they were installed to the Software share and are being run under an account with Administrator privileges. Unless you've customized WHS in some weird way or did something weird with permissions on the Software share, I'm stumped.
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#40
|
|||
|
|||
I'm guessing it's something to do with syntax and quotation marks. I just made an unscheduled task in "scheduled tasks" without changing the bat, and it worked fine. good enough for me, thanks!
__________________
[size=1]Current Server:V9 UNRAID Docker, SuperMicro x9dri-LNF4+, 32 GB ECC, 2x Xeon e5-2660v2, storage array 6TB, 2 Dish r5000HD tuners, 1 HDHomerun Quatro, 1 HDHomerun Extend 4 Nvidia Shield TVs with Miniclient |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
/opt/sagetv/scripts references | slamduncan | SageTV Linux | 1 | 05-12-2007 12:29 PM |
Scripts to modify XMLTV data. | grooves12 | SageTV EPG Service | 3 | 12-31-2006 11:50 PM |
init scripts | ChePazzo | SageTV Linux | 0 | 12-16-2006 12:28 PM |
Using Full SageTV as Client | backsix | SageTV Software | 8 | 05-17-2005 10:32 AM |
Full manual recording | ashenshugar | SageTV Software | 2 | 10-28-2003 01:55 PM |