| View previous topic :: View next topic |
| Author |
Message |
Space Replay elitist

Joined: 18 Nov 2010 Posts: 479
|
Posted: Mon Jun 18, 2012 9:20 pm Post subject: .bak files not deleted |
|
|
I have downloaded shows to my PC using DVArchive and I serve them to my ReplayTVs using WiRNS.
When I delete a show through the WiRNS server using my ReplayTV, it deletes all the associated files for the given show, except for the .bak file (which apparently only exists for a show that has had it's show information changed using DVArchive). Can WiRNS (I'm using v2.1) be updated to also delete this file?
Thanks! |
|
| Back to top |
|
 |
hdonzis Moderator

Joined: 05 Jan 2005 Posts: 7827 Location: San Antonio, TX
|
Posted: Tue Jun 19, 2012 7:09 am Post subject: |
|
|
No, WiRNS doesn't care about DVArchive files and has no idea about what files DVArchive uses. It only manages the files that WiRNS deals with. Anyway, this is kind of like removing an installed application, which only deletes the files that were created by the install and not files that were created later. WiRNS isn't going to touch files that were created by some other application, that would be a major no-no!
It's all kind of moot anyway because it is so trivial to write a script to do this for you. Just run a script once a day or so that looks for .bak files and checks if there is a matching .mpg file, for example, and delete the .bak file if there isn't. At least then it is YOU doing this, if you're unhappy with it, then it's up to you. I would never put this oblication on WiRNS to ever consider deleting files that weren't its own...
By the way WiRNS already deletes its backup of editing the show information file so that they don't get left around. Maybe you should talk to Gerry about doing the same with DVArchive. If DVArchive is going to leave the files laying around, then I assume that there is a reason for this, and it shouldn't be up to WiRNS to do anything about that, it should be up to DVArchive or the user...
Henry _________________ Here's my Poop |
|
| Back to top |
|
 |
srfrdan Replay elitist

Joined: 14 Feb 2010 Posts: 247
|
Posted: Tue Jun 19, 2012 2:04 pm Post subject: |
|
|
those files accumulate in my l_g and i delete them periodically. they dont appear to have any function once theyre created. theres some for each show but not every one only choice whatever that may be and one for all the shows---d. ps--if u make a script like h suggests let us know cause i wouldnt how'''thanx _________________ my poop at srfrdanu1 4k*5k
|
|
| Back to top |
|
 |
hdonzis Moderator

Joined: 05 Jan 2005 Posts: 7827 Location: San Antonio, TX
|
Posted: Tue Jun 19, 2012 3:12 pm Post subject: |
|
|
Here's an example of how to get the .bak file names:
| Code: | | for /r c:\wirns\shows %f in (*.bak) do echo %~nf |
Henry _________________ Here's my Poop |
|
| Back to top |
|
 |
hdonzis Moderator

Joined: 05 Jan 2005 Posts: 7827 Location: San Antonio, TX
|
Posted: Tue Jun 19, 2012 8:38 pm Post subject: |
|
|
Here' a sample batch file to delete dangling .bak files:
| Code: | @echo off
for %%f in (c:\wirns\shows\*.bak) do (
if not exist %%~nf.mpg (
del %%f
echo Deleted %%f
)
) |
You could set a WiRNS event to run this each Rebuild ToDo, Refresh Replay, Update Guide, etc., or even just an every so often Timer. Just as easily, you could set a Windows schedule to run this every so often as well...
Henry _________________ Here's my Poop |
|
| Back to top |
|
 |
TakeTheActive Planet Master


Joined: 11 Mar 2004 Posts: 720 Location: Central Jersey, USA
|
Posted: Fri Jun 22, 2012 2:31 pm Post subject: |
|
|
Nice...
But... (see 07/05/12 post) _________________ Low Post Count != Low Knowledge ergo High Post Count != High Knowledge
Sig LINKs
Last edited by TakeTheActive on Thu Jul 05, 2012 7:13 am; edited 1 time in total |
|
| Back to top |
|
 |
srfrdan Replay elitist

Joined: 14 Feb 2010 Posts: 247
|
|
| Back to top |
|
 |
Space Replay elitist

Joined: 18 Nov 2010 Posts: 479
|
Posted: Wed Jul 04, 2012 10:52 pm Post subject: |
|
|
Woah! Totally forgot about this thread...
Thanks for the script Henry.
Is there any adverse affect to just deleting ALL the *.bak files, regardless of the presence of the corresponding *.mgs, etc. files?
I assume there would be none to WiRNS, since it doesn't use them.
I'm not sure how DVArchive uses them. |
|
| Back to top |
|
 |
TakeTheActive Planet Master


Joined: 11 Mar 2004 Posts: 720 Location: Central Jersey, USA
|
Posted: Thu Jul 05, 2012 4:12 am Post subject: DVArchive Backs Up XMLs to BAKs... |
|
|
| Space wrote: | | ...I'm not sure how DVArchive uses them. |
Whenever you EDIT the XML, aka Show Details 'Stuff', file in DVArchive, it copies the previous version to a .BAK file. _________________ Low Post Count != Low Knowledge ergo High Post Count != High Knowledge
Sig LINKs |
|
| Back to top |
|
 |
hdonzis Moderator

Joined: 05 Jan 2005 Posts: 7827 Location: San Antonio, TX
|
Posted: Thu Jul 05, 2012 6:07 am Post subject: |
|
|
| Space wrote: | Is there any adverse affect to just deleting ALL the *.bak files, regardless of the presence of the corresponding *.mgs, etc. files?
I assume there would be none to WiRNS, since it doesn't use them.
I'm not sure how DVArchive uses them. |
I was going to mention something similar originally, but I believe that DVA does use .bak files for some of its own stuff as well. For example, I believe that it may create DVArchive.bak files in the directories that you have shows stored where it is keeping track of information about the shows in those directories. Of course, if you assume that the .bak files are there only in case you want to undo something and you don't care about that, then I might assume that you could just delete them. WiRNS also uses .bak files, but it deletes them when it is done. And, of course, other applications might create .bak files for their own purposes. My script will delete any .bak files that don't belong to an MPEG file, so it would already delete any other DVA backup files in addition to any other application's backup files, so I suppose it's really not that much different than just deleting all .bak files...
Henry _________________ Here's my Poop |
|
| Back to top |
|
 |
TakeTheActive Planet Master


Joined: 11 Mar 2004 Posts: 720 Location: Central Jersey, USA
|
Posted: Thu Jul 05, 2012 7:12 am Post subject: Other DVArchive .BAK Files... |
|
|
| hdonzis wrote: | | I was going to mention something similar originally, but I believe that DVA does use .bak files for some of its own stuff as well. For example, I believe that it may create DVArchive.bak files in the directories that you have shows stored where it is keeping track of information about the shows in those directories... |
Well, I didn't intend to get into this much detail, but as long as you posted an incorrect statement (yes, I see the 'believe' disclaimer - much like my usage of IIRC, AFAICT, AFAIK, etc... ), I'll expand. The DVArchive.BAK file is a mirror image of DVArchive.XML that is stored in *EVERY* Path DVArchive stores files in. It has nothing SPECIFIC to do with the shows stored in that directory. It's just more copies of the DVArchive.XML, in addition to the 7 or 14 or whatever you tell it to make Daily Backups stored in CONFIG.
| hdonzis wrote: | ...My script: | Code: | @echo off
for %%f in (c:\wirns\shows\*.bak) do (
if NOT exist %%~nf.mpg (
del %%f
echo Deleted %%f
)
) |
...will delete any .bak files that don't belong to an MPEG file, so it would already delete any other DVA backup files in addition to any other application's backup files, so I suppose it's really not that much different than just deleting all .bak files... |
Actually, I was so impressed with the FORMAT of your script and the usage of the %%~nf parameter (I used that group in No_Dups.BAT), I missed the NOT. Remove the NOT and all the BAKs from editing the Show.XMLs will be deleted, *IF* the Show's MPG still exists and *IF* you only have ONE DVArchive Storage Path per instance. If you have multiple Storage Paths per instance, the BAK will be created in the first even though the MPG could be in 2-N. (I refer to them as 'Orphans' in my scripts.)
Knowing exactly what each type of DVArchive BAK file contains helps in the decision on whether or not to delete it.
Bottom Line: Based on the daily activity on the DVArchive Forum, I believe that the majority of the users have moved on, so hour-long essays won't be read by many...  _________________ Low Post Count != Low Knowledge ergo High Post Count != High Knowledge
Sig LINKs |
|
| Back to top |
|
 |
hdonzis Moderator

Joined: 05 Jan 2005 Posts: 7827 Location: San Antonio, TX
|
Posted: Thu Jul 05, 2012 7:28 am Post subject: Re: Other DVArchive .BAK Files... |
|
|
| TakeTheActive wrote: | | hdonzis wrote: | | I was going to mention something similar originally, but I believe that DVA does use .bak files for some of its own stuff as well. For example, I believe that it may create DVArchive.bak files in the directories that you have shows stored where it is keeping track of information about the shows in those directories... |
Well, I didn't intend to get into this much detail, but as long as you posted an incorrect statement (yes, I see the 'believe' disclaimer - much like my usage of IIRC, AFAICT, AFAIK, etc... ), I'll expand. The DVArchive.BAK file is a mirror image of DVArchive.XML that is stored in *EVERY* Path DVArchive stores files in. It has nothing SPECIFIC to do with the shows stored in that directory. It's just more copies of the DVArchive.XML, in addition to the 7 or 14 or whatever you tell it to make Daily Backups stored in CONFIG. |
There really wasn't any point in my going into detail about what purpose each and every DVArchive .bak file serves! I was giving an example, and as an example, my statement was absolutely correct! It certainly DOES have information about the shows, in addition to having a whole lot of information about a bunch of other things. And, it certainly is in the directories that you are storing shows because those are the directories that are configured in DVA to deal with shows. I don't believe it would have served any more purpose in my going into any more technical detail about exactly what purpose that specific file serves, you completely missed the point that I was making that there are other DVA .bak files which don't have to do with show MPEG files and will never be associated with those file names. End of story! If someone wants the specific question of all the possibilities of DVA .bak files and purpose they serve, they'd have to ask Gerry! I was only giving one example to make the point...
Henry _________________ Here's my Poop |
|
| Back to top |
|
 |
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|