pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedHow can I insert the image as a blob in the table
11+ messages / 5 participants
[nested] [flat]
* How can I insert the image as a blob in the table
@ 2021-04-11 21:03 Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Igor Korot @ 2021-04-11 21:03 UTC (permalink / raw)
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi, ALL,
I have an image on my hard drive and I'd like to store it in the BLOB
column of the images table.
Is there a simple SQL to do that in PostgreSQL?
Thank you.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
@ 2021-04-11 23:24 ` David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: David G. Johnston @ 2021-04-11 23:24 UTC (permalink / raw)
To: Igor Korot <ikorot01@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Sun, Apr 11, 2021 at 2:04 PM Igor Korot <ikorot01@gmail.com> wrote:
> Hi, ALL,
> I have an image on my hard drive and I'd like to store it in the BLOB
> column of the images table.
>
> Is there a simple SQL to do that in PostgreSQL?
>
>
SQL proper has no concept of "your hard drive". You need to define what
you plan to use as an in between layer that can produce SQL AND see "your
hard drive" (i.e., what database client). Also, BLOB isn't an actual thing
in PostgreSQL proper (though generic client APIs may use that term), so I
presume you mean to store the contents in a "bytea" typed column. You
could also convert the binary to a encoded text compatible type (e.g.,
base64) and use a text field instead.
If you can decide on what client interface you want to use there should be
existing resources on the web walking through how to do this using that
client interface.
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
@ 2021-04-11 23:49 ` Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Igor Korot @ 2021-04-11 23:49 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi, David,
On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Sun, Apr 11, 2021 at 2:04 PM Igor Korot <ikorot01@gmail.com> wrote:
>>
>> Hi, ALL,
>> I have an image on my hard drive and I'd like to store it in the BLOB
>> column of the images table.
>>
>> Is there a simple SQL to do that in PostgreSQL?
>>
>
> SQL proper has no concept of "your hard drive". You need to define what you plan to use as an in between layer that can produce SQL AND see "your hard drive" (i.e., what database client). Also, BLOB isn't an actual thing in PostgreSQL proper (though generic client APIs may use that term), so I presume you mean to store the contents in a "bytea" typed column. You could also convert the binary to a encoded text compatible type (e.g., base64) and use a text field instead.
>
> If you can decide on what client interface you want to use there should be existing resources on the web walking through how to do this using that client interface.
Something like this:
INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
Looking to run it from gAdmin in the Terminal.
Thank you.
>
> David J.
>
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
@ 2021-04-11 23:57 ` David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:02 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:08 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
0 siblings, 2 replies; 11+ messages in thread
From: David G. Johnston @ 2021-04-11 23:57 UTC (permalink / raw)
To: Igor Korot <ikorot01@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> wrote:
> Hi, David,
>
>
> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
> <david.g.johnston@gmail.com> wrote:
>
> > If you can decide on what client interface you want to use there should
> be existing resources on the web walking through how to do this using that
> client interface.
>
> Something like this:
>
> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>
> Looking to run it from gAdmin in the Terminal.
>
As SQL is executed on the server there is the major issue of the server
being unable to resolve /home on the client machine. But maybe pgAdmin has
its own way to deal with this. Have you read its documentation?
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
@ 2021-04-12 00:02 ` David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 11+ messages in thread
From: David G. Johnston @ 2021-04-12 00:02 UTC (permalink / raw)
To: Igor Korot <ikorot01@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Sunday, April 11, 2021, David G. Johnston <david.g.johnston@gmail.com>
wrote:
> On Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> wrote:
>
>> Hi, David,
>>
>>
>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>> <david.g.johnston@gmail.com> wrote:
>>
>> > If you can decide on what client interface you want to use there should
>> be existing resources on the web walking through how to do this using that
>> client interface.
>>
>> Something like this:
>>
>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>>
>> Looking to run it from gAdmin in the Terminal.
>>
>
> As SQL is executed on the server there is the major issue of the server
> being unable to resolve /home on the client machine. But maybe pgAdmin has
> its own way to deal with this. Have you read its documentation?
>
>
Or:
https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-GENFILE
David J.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
@ 2021-04-12 00:08 ` Igor Korot <ikorot01@gmail.com>
2021-04-13 01:29 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
1 sibling, 1 reply; 11+ messages in thread
From: Igor Korot @ 2021-04-12 00:08 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi, David,
On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> On Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> wrote:
>>
>> Hi, David,
>>
>>
>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>> <david.g.johnston@gmail.com> wrote:
>>
>> > If you can decide on what client interface you want to use there should be existing resources on the web walking through how to do this using that client interface.
>>
>> Something like this:
>>
>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>>
>> Looking to run it from gAdmin in the Terminal.
>
>
> As SQL is executed on the server there is the major issue of the server being unable to resolve /home on the client machine. But maybe pgAdmin has its own way to deal with this. Have you read its documentation?
I don't know - server is running on the same OSX machine as pgAdmin will be.
Thank you.
>
> David J.
>
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:08 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
@ 2021-04-13 01:29 ` Igor Korot <ikorot01@gmail.com>
2021-04-13 01:38 ` Re: How can I insert the image as a blob in the table Rob Sargent <robjsargent@gmail.com>
2021-04-13 01:47 ` Re: How can I insert the image as a blob in the table Ron <ronljohnsonjr@gmail.com>
2021-04-13 02:31 ` Re: How can I insert the image as a blob in the table Abdul Qoyyuum <aqoyyuum@cardaccess.com.au>
0 siblings, 3 replies; 11+ messages in thread
From: Igor Korot @ 2021-04-13 01:29 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi, guys,
On Sun, Apr 11, 2021 at 7:08 PM Igor Korot <ikorot01@gmail.com> wrote:
>
> Hi, David,
>
> On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston
> <david.g.johnston@gmail.com> wrote:
> >
> > On Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> wrote:
> >>
> >> Hi, David,
> >>
> >>
> >> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
> >> <david.g.johnston@gmail.com> wrote:
> >>
> >> > If you can decide on what client interface you want to use there should be existing resources on the web walking through how to do this using that client interface.
> >>
> >> Something like this:
> >>
> >> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
> >>
> >> Looking to run it from gAdmin in the Terminal.
> >
> >
> > As SQL is executed on the server there is the major issue of the server being unable to resolve /home on the client machine. But maybe pgAdmin has its own way to deal with this. Have you read its documentation?
>
> I don't know - server is running on the same OSX machine as pgAdmin will be.
So nobody is playing with the images?
Is it even possible - to insert an image as BLOB into the database
using a simple
INSERT INTO query?
Thank you.
>
> Thank you.
>
> >
> > David J.
> >
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:08 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-13 01:29 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
@ 2021-04-13 01:38 ` Rob Sargent <robjsargent@gmail.com>
2 siblings, 0 replies; 11+ messages in thread
From: Rob Sargent @ 2021-04-13 01:38 UTC (permalink / raw)
To: Igor Korot <ikorot01@gmail.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
>
> On Apr 12, 2021, at 7:29 PM, Igor Korot <ikorot01@gmail.com> wrote:
>
> Hi, guys,
>
> On Sun, Apr 11, 2021 at 7:08 PM Igor Korot <ikorot01@gmail.com <mailto:ikorot01@gmail.com>> wrote:
>>
>> Hi, David,
>>
>> On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston
>> <david.g.johnston@gmail.com> wrote:
>>>
>>> On Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> wrote:
>>>>
>>>> Hi, David,
>>>>
>>>>
>>>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>>>> <david.g.johnston@gmail.com> wrote:
>>>>
>>>>> If you can decide on what client interface you want to use there should be existing resources on the web walking through how to do this using that client interface.
>>>>
>>>> Something like this:
>>>>
>>>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>>>>
>>>> Looking to run it from gAdmin in the Terminal.
>>>
>>>
>>> As SQL is executed on the server there is the major issue of the server being unable to resolve /home on the client machine. But maybe pgAdmin has its own way to deal with this. Have you read its documentation?
>>
>> I don't know - server is running on the same OSX machine as pgAdmin will be.
>
> So nobody is playing with the images?
>
> Is it even possible - to insert an image as BLOB into the database
> using a simple
> INSERT INTO query?
Many of us ‘play with images’. We use tools to write to the database. I’m currently using java to write millions of records into the database include bytea columns with 50-100K binary data. What tools do you have at hand?
It’s difficult to get an image into a string like ‘insert into tablename values (<what would go here>)’
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:08 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-13 01:29 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
@ 2021-04-13 01:47 ` Ron <ronljohnsonjr@gmail.com>
2 siblings, 0 replies; 11+ messages in thread
From: Ron @ 2021-04-13 01:47 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 4/12/21 8:29 PM, Igor Korot wrote:
> Hi, guys,
>
> On Sun, Apr 11, 2021 at 7:08 PM Igor Korot <ikorot01@gmail.com> wrote:
>> Hi, David,
>>
>> On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston
>> <david.g.johnston@gmail.com> wrote:
>>> On Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> wrote:
>>>> Hi, David,
>>>>
>>>>
>>>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>>>> <david.g.johnston@gmail.com> wrote:
>>>>
>>>>> If you can decide on what client interface you want to use there should be existing resources on the web walking through how to do this using that client interface.
>>>> Something like this:
>>>>
>>>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>>>>
>>>> Looking to run it from gAdmin in the Terminal.
>>>
>>> As SQL is executed on the server there is the major issue of the server being unable to resolve /home on the client machine. But maybe pgAdmin has its own way to deal with this. Have you read its documentation?
>> I don't know - server is running on the same OSX machine as pgAdmin will be.
> So nobody is playing with the images?
>
> Is it even possible - to insert an image as BLOB into the database
> using a simple
> INSERT INTO query?
psql only understands text input. Therefore, the image must be text (like
base64) or hex with a leading "\\x".
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:08 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-13 01:29 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
@ 2021-04-13 02:31 ` Abdul Qoyyuum <aqoyyuum@cardaccess.com.au>
2021-04-13 02:37 ` Re: How can I insert the image as a blob in the table Rob Sargent <robjsargent@gmail.com>
2 siblings, 1 reply; 11+ messages in thread
From: Abdul Qoyyuum @ 2021-04-13 02:31 UTC (permalink / raw)
To: Igor Korot <ikorot01@gmail.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Have you tried
insert into table(picture) values(lo_import('D:\image.jpg'));
?
On Tue, Apr 13, 2021 at 9:30 AM Igor Korot <ikorot01@gmail.com> wrote:
> Hi, guys,
>
> On Sun, Apr 11, 2021 at 7:08 PM Igor Korot <ikorot01@gmail.com> wrote:
> >
> > Hi, David,
> >
> > On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston
> > <david.g.johnston@gmail.com> wrote:
> > >
> > > On Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> wrote:
> > >>
> > >> Hi, David,
> > >>
> > >>
> > >> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
> > >> <david.g.johnston@gmail.com> wrote:
> > >>
> > >> > If you can decide on what client interface you want to use there
> should be existing resources on the web walking through how to do this
> using that client interface.
> > >>
> > >> Something like this:
> > >>
> > >> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
> > >>
> > >> Looking to run it from gAdmin in the Terminal.
> > >
> > >
> > > As SQL is executed on the server there is the major issue of the
> server being unable to resolve /home on the client machine. But maybe
> pgAdmin has its own way to deal with this. Have you read its documentation?
> >
> > I don't know - server is running on the same OSX machine as pgAdmin will
> be.
>
> So nobody is playing with the images?
>
> Is it even possible - to insert an image as BLOB into the database
> using a simple
> INSERT INTO query?
>
> Thank you.
>
> >
> > Thank you.
> >
> > >
> > > David J.
> > >
>
>
>
--
Abdul Qoyyuum Bin Haji Abdul Kadir
HP No: +673 720 8043
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: How can I insert the image as a blob in the table
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` Re: How can I insert the image as a blob in the table David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:08 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-13 01:29 ` Re: How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-13 02:31 ` Re: How can I insert the image as a blob in the table Abdul Qoyyuum <aqoyyuum@cardaccess.com.au>
@ 2021-04-13 02:37 ` Rob Sargent <robjsargent@gmail.com>
0 siblings, 0 replies; 11+ messages in thread
From: Rob Sargent @ 2021-04-13 02:37 UTC (permalink / raw)
To: Abdul Qoyyuum <aqoyyuum@cardaccess.com.au>; +Cc: Igor Korot <ikorot01@gmail.com>; David G. Johnston <david.g.johnston@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
> On Apr 12, 2021, at 8:31 PM, Abdul Qoyyuum <aqoyyuum@cardaccess.com.au> wrote:
>
> Have you tried
>
> insert into table(picture) values(lo_import('D:\image.jpg'));
> ?
>
No, I’m doing some non-standard compression on the way down.=
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2021-04-13 02:37 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 21:03 How can I insert the image as a blob in the table Igor Korot <ikorot01@gmail.com>
2021-04-11 23:24 ` David G. Johnston <david.g.johnston@gmail.com>
2021-04-11 23:49 ` Igor Korot <ikorot01@gmail.com>
2021-04-11 23:57 ` David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:02 ` David G. Johnston <david.g.johnston@gmail.com>
2021-04-12 00:08 ` Igor Korot <ikorot01@gmail.com>
2021-04-13 01:29 ` Igor Korot <ikorot01@gmail.com>
2021-04-13 01:38 ` Rob Sargent <robjsargent@gmail.com>
2021-04-13 01:47 ` Ron <ronljohnsonjr@gmail.com>
2021-04-13 02:31 ` Abdul Qoyyuum <aqoyyuum@cardaccess.com.au>
2021-04-13 02:37 ` Rob Sargent <robjsargent@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox