Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DoDelete function of Opendeploy
amar_maheshwary
Hi Guys,
I am trying to use do Delete function of OpenDeploy. I am deploying a file which does nt exist in teamsite but this file exist on live server.
For example I have a file index.jsp on TeamSite and index.html on live server. I just want to delete index.html on live server so while deploying in the file list of Opendeploy I am modifying the filename from index.jsp to index.html. Now Opendeploy would not be able to find index.html on TeamSite but as doDelete option is YES then it should be able to delete file on live server but when I am trying here it is not deleteing index.html on live server. Any clue how should we go for this problem ?
Looking forward to your response.
regards
-Amar
Find more posts tagged with
Comments
iwovGraduate
Is index.html in your filelist ?
Adam Stoller
Two choices come to mind (there are others,but they're hacks utilizing DNR scripts):
1. Do a full directory-comparison deployment between the source and target areas -- anything that does not exist on the sender [and which is not filtered out] will be deleted on the target.
2. Create a filelist with the deployment-area-relative-path to the file that does not exist on the sender and do a filelist deployment -- any file listed in the filelist which does not exist on the receiver will be deleted.
(obviously both of the above assume doDeletes is enabled)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
John742
If you are using filelist deployments in OD, instead of renaming the file index.jsp to index.html. Create a new file called index.html so both files exist in Teamsite. Then you can delete the index.jsp do a "view modified" and select your deleted file for a new job. This will push the deletion out to production. Assuming dodeletes="yes". Directory comparsion is disabled for filelist deployments.
J Dagenhardt
Adam Stoller
John - I think you're behind the times here a bit - unless he's using OD 4.x
OD 5.x (I'm pretty sure all versions, but almost definitely since 5.5.1) supports comparisons for deletion purposes with filelists - so if you have an entry in your filelist that does not exist on the source side it is translated into a deletion request for the target side.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
John742
I agree but I do not think that the file that wants to be deleted is making it to the filelist and directory comparsion will NOT compare locations during a filelist deployment it simply looks at the list of files.
J Dagenhardt
John742
I guess it really depends on how the fielist file is getting populated. If a simple getfiles is being used then only the new file name would exist in the filelist for the deployment. If this is the case then the new file would be deployed and the old file(which would only exist in view modified) would be left untouched in the deployement location.
J Dagenhardt
Adam Stoller
Ah - I understand your statement now - yes - in terms of an automated process, the manner in which the filelist gets created is important because you would need to track the deletion of the file in order to include it in the filelist to deploy it as such.
My customer has a custom Delete menu item and a custom Move/Rename menu item which take care of this kind of thing (and other stuff too).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
amar_maheshwary
Hi Guys,
Thanks for your inputs. I am able to delete file by renaming the filename. I have index.html on live server and index.jsp at the local server. After creating the list I am modifying index.jsp to index.html and run the OpenDeploy script. It deletes the file at live server and not able to deploy any file there.
But another problem in contnuation to this is
is there anyway using which we just able to delete the file but od script doesnt deploy anything there. In my filelist I have all the files present in TeamSite and all those files should be deleted from live portal but it should only delete the files. It should not be able to deploy any thing on live server from teamsite. Any feature in OpenDeploy which prevents deployment and go for only deletion.
Looking forward for your response.
Regards
-Amar
Michael
Hi Amar
If I understand correctly you don't want to deploy any files at all -- you just wish to delete files on your target server. Is that right?
If so, maybe you could do this:
- you have your full fiilelist with all the files you want to delete
- create another filelist which just contains the filename of your full filelist
- execute a filelist deployment (using the second filelist as the OD filelist) and deploy your full filelist file to the target server. Then have OD execute a DnR script on the target which deletes the files listed in the file you just deployed.
You also might be able to achieve your requirement using filters in your OD config -- although I recall the combinations with filters and doDeletes can be a bit confusing....might be worth looking into though.
Hope this helps
Cheers
Michael
amar_maheshwary
Hi Michael,
Yeps you understood it correctly. I need to delete all the files on live server. But I didnt get why you want me to create another filelist and I would require rights of root to run this which is again a constraint?
I tried this using Directory comparision deployment. I created an empty directory as source and target directory is given from which I have to delete the files.
started the deployment and bingo, it is able to delete the files from live server.
But here I am not able to take carewhich files I have deleted and so its difficult to remove metadata for that afterwards.
Any other suggestions on this.
Regards
-Amar
Michael
Hi Amar
I do not understand what you mean when you say "But here I am not able to take carewhich files I have deleted and so its difficult to remove metadata for that afterwards."
What metadata? From where? ????
Cheers
Michael
amar_maheshwary
every file has metadata associated for search which is being deployed using datadeploy.. right . And that metdata needs to be deleted as well when you delete a file. Directory comparision will delete the files only but would not be able to delete metadata and then that metadata will be redundant in datadeploy server.
I hope it makes sense to you now.
Regards
-Amar
Michael
How about a DnR execution of DD and using the manifest file for a list of files to process?
Michael
amar_maheshwary
Hi Michael,
Yeps I was trying in the similar way. Pass the filelist to Datadeploy script iwdd.ipl to delete the metadata but wondering is there any specific arguement need to pass for deletion of metadata. Any idea how to delete metadata using iwdd.ipl
Regards
-Amar
Michael
If you pass your filelist to DD and it contains files which aren't present in your source location then DD should delete the corresponding records from the database. I don't think there are any specific arguments you need to pass - it is just normal behaviour.
DD would need to be able to locate those records either via path or deltracker I guess.
Cheers
Michael
amar_maheshwary
Hi Michael,
I am doing the cleanup using directory comparision and after that when I search the records in metadata table metadata entries still exist in the table. Is there any way we can delete the metadata afterwards. I was thinking to delete the metadata directly from table using Delete query. But I found this to be very crude and more error prone. Any other ideas how can we delete metadata either at the time of deployment ( directory comparision) or after cleanup of branch.
Regards
-Amar
Ottawa_IWOV
Soooo ...
Is there a way to achieve "DoDeletes" with a filelist deployment?
Adam Stoller
Yes - and there has been for quite some time -- perhaps just not the way you're thinking about it.
If you put an entry in your filelist that does not exist on the source side of the deployment, and you have doDeletes enabled - then it generates a delete request on the target side.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com