Re: [rt-users] Attachment extraction from DB

2012-07-05 Thread Ruslan Zakirov
On Tue, Jul 3, 2012 at 8:02 AM, ronald higgins  wrote:
> right clicking through 1.2 million tickets might cause some finger strain :)
>
> indeed, i meant a method to dump directly from mySQL to disk. i shall look
> into how to interact via the api then.

For mysql it's pretty much simple. Just dump whatever in Content column. I would
use Perl API rather than REST for this operation, but it's for you to decide.

>
> thanks
>
> On 2 Jul 2012 23:58, "Kevin Riggle"  wrote:
>>
>> Excerpts from ronald higgins's message of Mon Jul 02 03:41:18 -0400 2012:
>> > Hi All,
>> >
>> > Has anyone ever had to extract files (docs,pdf's) out of the RT DB
>> > onto files on the filesystem? If so would you mind sharing how you
>> > went about it?
>>
>> To be terribly snarky, I went to the attachment I wanted in RT's web UI,
>> right-clicked on the link, and selected 'Save link as'.
>>
>> Look at lib/RT/Attachment.pm and the places it's used for how RT does
>> it, using the Perl API.  And that's mostly just taking the information
>> that running 'describe Attachments' in your favorite SQL DB will tell
>> you exists in the database and putting it in the right places.
>>
>> Best,
>> - KevinR



-- 
Best regards, Ruslan.


Re: [rt-users] Attachment extraction from DB

2012-07-02 Thread ronald higgins
right clicking through 1.2 million tickets might cause some finger strain :)

indeed, i meant a method to dump directly from mySQL to disk. i shall look
into how to interact via the api then.

thanks
On 2 Jul 2012 23:58, "Kevin Riggle"  wrote:

> Excerpts from ronald higgins's message of Mon Jul 02 03:41:18 -0400 2012:
> > Hi All,
> >
> > Has anyone ever had to extract files (docs,pdf's) out of the RT DB
> > onto files on the filesystem? If so would you mind sharing how you
> > went about it?
>
> To be terribly snarky, I went to the attachment I wanted in RT's web UI,
> right-clicked on the link, and selected 'Save link as'.
>
> Look at lib/RT/Attachment.pm and the places it's used for how RT does
> it, using the Perl API.  And that's mostly just taking the information
> that running 'describe Attachments' in your favorite SQL DB will tell
> you exists in the database and putting it in the right places.
>
> Best,
> - KevinR
>


Re: [rt-users] Attachment extraction from DB

2012-07-02 Thread Robert Blackwell
Hi,

API's exist for a reason. I am curious if your really mean direct DB access or 
just a way to extract an attachment.

I would start with 
http://search.cpan.org/~jlmartin/RT-Client-REST-0.43/lib/RT/Client/REST/Attachment.pm.

Robert


On Jul 2, 2012, at 3:41 AM, ronald higgins  wrote:

> Hi All,
> 
> Has anyone ever had to extract files (docs,pdf's) out of the RT DB
> onto files on the filesystem? If so would you mind sharing how you
> went about it?
> 
> Regards
> 
> Ronald


Re: [rt-users] Attachment extraction from DB

2012-07-02 Thread Kevin Riggle
Excerpts from ronald higgins's message of Mon Jul 02 03:41:18 -0400 2012:
> Hi All,
> 
> Has anyone ever had to extract files (docs,pdf's) out of the RT DB
> onto files on the filesystem? If so would you mind sharing how you
> went about it?

To be terribly snarky, I went to the attachment I wanted in RT's web UI,
right-clicked on the link, and selected 'Save link as'.

Look at lib/RT/Attachment.pm and the places it's used for how RT does
it, using the Perl API.  And that's mostly just taking the information
that running 'describe Attachments' in your favorite SQL DB will tell
you exists in the database and putting it in the right places.

Best,
- KevinR


[rt-users] Attachment extraction from DB

2012-07-02 Thread ronald higgins
Hi All,

Has anyone ever had to extract files (docs,pdf's) out of the RT DB
onto files on the filesystem? If so would you mind sharing how you
went about it?

Regards

Ronald