Upload manager help

(imported topic written by cstoneba)

I run a vbs on our cluster endpoints that creates a .txt file and I need every clients .txt file to be emailed to one specific email addr. The issue is that based on which domain the endpoint is in, it could use any one of a number of smpt servers, plus smtp may be blocked by various firewalls.

So I was going to use the upload manager to upload the .txt files to the main bes. however, I am noticing that for each upload, a seperate folder is created under “\BigFix Enterprise\BES Server\UploadManagerData\BufferDir\sha1”

Then from the Main BES, I was going to have a task that uses Blat to email the files to the email recipient.

Anyone have any workarounds for this, or maybe just a different method to get these files to the recipient? They must be sent via email because the receipient is a SharePoint server.

(imported comment written by BenKus)

Maybe write a script that iterates through the folders and emails the files?

Ben

(imported comment written by cstoneba)

I am pushing this fixlet to 3 endpoints: 1 xp, 1 win7, & 1 Win2008. The Winxp is the only client to upload the file {computer name}.txt . The file gets created in c:\ on the 2 other boxes, but no upload. Any idea why?

delete c:"{computer name}".txt

delete __appendfile

appendfile {computer name}

appendfile {current time_of_day}

move __appendfile c:"{computer name}".txt

setting “_BESClient_ArchiveManager_OperatingMode”=“2” on “{now}” for client

setting “_BESClient_ArchiveManager_FileSet”=“c:{computer name}.txt” on “{now}” for client

setting “_BESClient_ArchiveManager_SendAll”=“1” on “{now}” for client

setting “_BESClient_ArchiveManager_MaxArchiveSize”=“100000” on “{now}” for client

archive now

This is the contents of the file Index.txt on the failing endpoints:

MIME-Version: 1.0

Content-Type: multipart/x-directory2; boundary="==="

Unique-ID: 14892566

Archive-Size: 0

SendAll: 1

Date: Fri, 08 Jul 2011 18:48:37 +0000

===

(imported comment written by cstoneba)

anyone?

(imported comment written by SystemAdmin)

Here is how we set up our upload jobs (maybe this will help???):

We run a four step process daily. The first two are on the clients, the last two are on the server.

  1. Dump whatever logs/files into a common location locally. We also create a file called computername.txt into which is echoed the computer name. This becomes important later.

  2. Upload parameters are set and the actual upload occurs from the client.

Delete __appendfile

Appendfile {computer name}

Delete c:\computername.txt

Copy __appendfile c:\computername.txt

setting “_BESClient_ArchiveManager_FileSet-Name”=“c:\computername.txt” on “{now}” for client

setting “_BESClient_ArchiveManager_OperatingMode”=“2” on “{now}” for client

setting “_BESClient_ArchiveManager_SendAll”=“1” on “{now}” for client

setting “_BESClient_ArchiveManager_MaxArchiveSize”=“45000000” on “{now}” for client

<add various file sets …>

archive now

  1. On the server, we have a folder structure for all of the various types of data being uploaded. The previous contents are cleared. Then a batch file is dynamically built each day that basically xcopies files based on naming convention or file type into the respective folder structure location. This is the tricky part to get correct. It is also where the computername.txt file comes into play. It works particularly well if a strict naming convention is adhered to.

Appendfile {(“xcopy %22” & item 0 of it & “file_convention.log%22 %22d:\destination_folder_structure%22 /E /C /I /Y%0d%0a” ) of ((pathnames of it, lines 1 of files “Name_0_computername.txt” of it as string) of folders of folders of it ) of folders “e:\BigFix Enterprise\BES Server\UploadManagerData\BufferDir\sha1” whose (exists file “name_0_computername.txt” of folders of folders of it)}

Repeat lines like this as necessary substituting file conventions and folder structures as needed. Then execute the batch.

  1. Clear the upload manager folder structure (under the SHA1 folder) to prepare for tomorrow’s files. Sometimes we also automate compressing the uploaded files into an archive, then ftping them to their final destination.

For you, step five would be to recurse the extracted folder structure and send out e-mails.

We have successfully used this formula for years to move hundreds of thousands and GBs of files. Hopefully you can adapt it to do the e-mails that you need.

(imported comment written by cstoneba)

thanks JonL. I used your script, and it worked as expected. Maybe upload manager doesn’t like relevance substituion in the File Set name??? But it worked with the WinXP box, so I dunno…

thanks much though.

(imported comment written by cstoneba)

JonL, for your xcopy in step 3, it looks like you are moving your computername.txt files from the Sha1././ folders to a destination folder of your choice. This would work for only one client, correct, otherwise you would have files with the same name.

(imported comment written by SystemAdmin)

The file name “computername.txt” is consistent, but the actual end-point name is contained inside the file. It is the actual name inside the file that is used to create the new folder structure in your choice of destinations. The only purpose of that file is to provide a means for generating the new folder structure. We do this from 6k+ end-points nightly.

(imported comment written by cstoneba)

got it working, thanks

(imported comment written by cstoneba)

is there anyway to have the uploaded file names just be the original files names, and not have upload manager add the characters from the _BESClient_ArchiveManager_FileSet- client setting? the additional characters are not desirable.