Unix Technical Forum

restore does not restore auto increment fields

This is a discussion on restore does not restore auto increment fields within the MySQL forums, part of the Database Server Software category; --> I have a production server and testing server. Every so often i need to backup the production server and ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 09:48 AM
lewis
 
Posts: n/a
Default restore does not restore auto increment fields

I have a production server and testing server. Every so often i need
to backup the production server and restore it for testing.

I ran the mysql administrator backup on only the db i needed, and
restored the db on the test server. It carried all of my tables over
but all the auto-increment fields lost thier auto-increment status.

How do i restore this stuff.
Sorry if it is a simple question i am new to mysql.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 09:48 AM
lark
 
Posts: n/a
Default Re: restore does not restore auto increment fields

lewis wrote:
> I have a production server and testing server. Every so often i need
> to backup the production server and restore it for testing.
>
> I ran the mysql administrator backup on only the db i needed, and
> restored the db on the test server. It carried all of my tables over
> but all the auto-increment fields lost thier auto-increment status.
>
> How do i restore this stuff.
> Sorry if it is a simple question i am new to mysql.
>


how do you restore the database? if you are not dropping tables i can
see why this is happening.

--
lark -- hamzee@sbcdeglobalspam.net
To reply to me directly, delete "despam".
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 09:49 AM
lewis
 
Posts: n/a
Default Re: restore does not restore auto increment fields

On May 11, 5:13 pm, lark <ham...@sbcdeglobalspam.net> wrote:
> lewis wrote:
> > I have a production server and testing server. Every so often i need
> > to backup the production server and restore it for testing.

>
> > I ran the mysql administrator backup on only the db i needed, and
> > restored the db on the test server. It carried all of my tables over
> > but all the auto-increment fields lost thier auto-increment status.

>
> > How do i restore this stuff.
> > Sorry if it is a simple question i am new to mysql.

>
> how do you restore the database? if you are not dropping tables i can
> see why this is happening.
>
> --
> lark -- ham...@sbcdeglobalspam.net
> To reply to me directly, delete "despam".


I am restoring to a new (blank) database

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 09:49 AM
lark
 
Posts: n/a
Default Re: restore does not restore auto increment fields

lewis wrote:
> On May 11, 5:13 pm, lark <ham...@sbcdeglobalspam.net> wrote:
>> lewis wrote:
>>> I have a production server and testing server. Every so often i need
>>> to backup the production server and restore it for testing.
>>> I ran the mysql administrator backup on only the db i needed, and
>>> restored the db on the test server. It carried all of my tables over
>>> but all the auto-increment fields lost thier auto-increment status.
>>> How do i restore this stuff.
>>> Sorry if it is a simple question i am new to mysql.

>> how do you restore the database? if you are not dropping tables i can
>> see why this is happening.
>>
>> --
>> lark -- ham...@sbcdeglobalspam.net
>> To reply to me directly, delete "despam".

>
> I am restoring to a new (blank) database
>



when you backup make sure you have a couple of things done right in the
advanced options tab:
1-check add drop statements
2-check complete inserts
3-check comments (if need be)

then take the backup

when restoring make sure you select the file that was just backedup and
make sure that the original schema is selected for target schema and
that file type is sql, then just click the restore button and it should
restore everything including the autoincrements
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 09:50 AM
lewis
 
Posts: n/a
Default Re: restore does not restore auto increment fields

On May 14, 3:23 pm, lark <ham...@sbcglobal.net> wrote:
> lewis wrote:
> > On May 11, 5:13 pm, lark <ham...@sbcdeglobalspam.net> wrote:
> >> lewis wrote:
> >>> I have a production server and testing server. Every so often i need
> >>> to backup the production server and restore it for testing.
> >>> I ran the mysql administrator backup on only the db i needed, and
> >>> restored the db on the test server. It carried all of my tables over
> >>> but all the auto-increment fields lost thier auto-increment status.
> >>> How do i restore this stuff.
> >>> Sorry if it is a simple question i am new to mysql.
> >> how do you restore the database? if you are not dropping tables i can
> >> see why this is happening.

>
> >> --
> >> lark -- ham...@sbcdeglobalspam.net
> >> To reply to me directly, delete "despam".

>
> > I am restoring to a new (blank) database

>
> when you backup make sure you have a couple of things done right in the
> advanced options tab:
> 1-check add drop statements
> 2-check complete inserts
> 3-check comments (if need be)
>
> then take the backup
>
> when restoring make sure you select the file that was just backedup and
> make sure that the original schema is selected for target schema and
> that file type is sql, then just click the restore button and it should
> restore everything including the autoincrements- Hide quoted text -
>
> - Show quoted text -


i did all that and it did not seem to work
Here is what i have
I selected my database (ips) and made sure that all the
views,procedures,functions, and tables were selected
on the advanced tab (these are selected)
InnoDB online backup
complete bakcup
add drop statements
complete inserts
comments
fully qualified identifiers
compatibility mode
disable keys
backup type is sql files

I run the backup
copy the file

to restore
i select the file i just backed up
backup type sql files
original schema
charset: utf8

and start restore
All my tables, procs .. seem to come over fine, i just don't see the
autoinc flag.

Thanks for you help.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-28-2008, 09:50 AM
lark
 
Posts: n/a
Default Re: restore does not restore auto increment fields

lewis wrote:
> On May 14, 3:23 pm, lark <ham...@sbcglobal.net> wrote:
>> lewis wrote:
>>> On May 11, 5:13 pm, lark <ham...@sbcdeglobalspam.net> wrote:
>>>> lewis wrote:
>>>>> I have a production server and testing server. Every so often i need
>>>>> to backup the production server and restore it for testing.
>>>>> I ran the mysql administrator backup on only the db i needed, and
>>>>> restored the db on the test server. It carried all of my tables over
>>>>> but all the auto-increment fields lost thier auto-increment status.
>>>>> How do i restore this stuff.
>>>>> Sorry if it is a simple question i am new to mysql.
>>>> how do you restore the database? if you are not dropping tables i can
>>>> see why this is happening.
>>>> --
>>>> lark -- ham...@sbcdeglobalspam.net
>>>> To reply to me directly, delete "despam".
>>> I am restoring to a new (blank) database

>> when you backup make sure you have a couple of things done right in the
>> advanced options tab:
>> 1-check add drop statements
>> 2-check complete inserts
>> 3-check comments (if need be)
>>
>> then take the backup
>>
>> when restoring make sure you select the file that was just backedup and
>> make sure that the original schema is selected for target schema and
>> that file type is sql, then just click the restore button and it should
>> restore everything including the autoincrements- Hide quoted text -
>>
>> - Show quoted text -

>
> i did all that and it did not seem to work
> Here is what i have
> I selected my database (ips) and made sure that all the
> views,procedures,functions, and tables were selected
> on the advanced tab (these are selected)
> InnoDB online backup
> complete bakcup
> add drop statements
> complete inserts
> comments
> fully qualified identifiers
> compatibility mode
> disable keys
> backup type is sql files
>
> I run the backup
> copy the file
>
> to restore
> i select the file i just backed up
> backup type sql files
> original schema
> charset: utf8
>
> and start restore
> All my tables, procs .. seem to come over fine, i just don't see the
> autoinc flag.
>
> Thanks for you help.
>
>

one thing you may want to do is open up the backup file and see if your
table definitions include the autoincrement flags on the fields where
they should be set.

--
lark -- hamzee@sbcdeglobalspam.net
To reply to me directly, delete "despam".
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-28-2008, 09:54 AM
lewis
 
Posts: n/a
Default Re: restore does not restore auto increment fields

On May 16, 10:05 am, lark <ham...@sbcdeglobalspam.net> wrote:
> lewis wrote:
> > On May 14, 3:23 pm, lark <ham...@sbcglobal.net> wrote:
> >> lewis wrote:
> >>> On May 11, 5:13 pm, lark <ham...@sbcdeglobalspam.net> wrote:
> >>>> lewis wrote:
> >>>>> I have a production server and testing server. Every so often i need
> >>>>> to backup the production server and restore it for testing.
> >>>>> I ran the mysql administrator backup on only the db i needed, and
> >>>>> restored the db on the test server. It carried all of my tables over
> >>>>> but all the auto-increment fields lost thier auto-increment status.
> >>>>> How do i restore this stuff.
> >>>>> Sorry if it is a simple question i am new to mysql.
> >>>> how do you restore the database? if you are not dropping tables i can
> >>>> see why this is happening.
> >>>> --
> >>>> lark -- ham...@sbcdeglobalspam.net
> >>>> To reply to me directly, delete "despam".
> >>> I am restoring to a new (blank) database
> >> when you backup make sure you have a couple of things done right in the
> >> advanced options tab:
> >> 1-check add drop statements
> >> 2-check complete inserts
> >> 3-check comments (if need be)

>
> >> then take the backup

>
> >> when restoring make sure you select the file that was just backedup and
> >> make sure that the original schema is selected for target schema and
> >> that file type is sql, then just click the restore button and it should
> >> restore everything including the autoincrements- Hide quoted text -

>
> >> - Show quoted text -

>
> > i did all that and it did not seem to work
> > Here is what i have
> > I selected my database (ips) and made sure that all the
> > views,procedures,functions, and tables were selected
> > on the advanced tab (these are selected)
> > InnoDB online backup
> > complete bakcup
> > add drop statements
> > complete inserts
> > comments
> > fully qualified identifiers
> > compatibility mode
> > disable keys
> > backup type is sql files

>
> > I run the backup
> > copy the file

>
> > to restore
> > i select the file i just backed up
> > backup type sql files
> > original schema
> > charset: utf8

>
> > and start restore
> > All my tables, procs .. seem to come over fine, i just don't see the
> > autoinc flag.

>
> > Thanks for you help.

>
> one thing you may want to do is open up the backup file and see if your
> table definitions include the autoincrement flags on the fields where
> they should be set.
>
> --
> lark -- ham...@sbcdeglobalspam.net
> To reply to me directly, delete "despam".- Hide quoted text -
>
> - Show quoted text -


my backup file does not include any identity statements.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:08 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com