Send netdisco-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: Migration to a new server (Ricardo Stella)
2. Re: Migration to a new server (Christian Ramseyer)
3. Re: Migration to a new server (Ricardo Stella)
--- Begin Message ---
Hmm - getting the following:
[netdisco@netdisco2 ~]$ pg_dump -c -C netdisco > /tmp/netdisco_dump.sql
pg_dump: [archiver] -C and -c are incompatible options
Would the output done by backups be sufficient?
pg_dump -F c --create -f /home/netdisco/BACKUPS/netdisco-pgsql-$DATE.dump
netdisco
The lowercase 'c' above is for the format.
Thanks in advance - Ricardo.
On Wed, Jan 15, 2020 at 6:21 PM Christian Ramseyer <[email protected]>
wrote:
>
>
> On 15.01.20 23:15, Ricardo Stella wrote:
> >
> > Hi,
> >
> > Looking at upgrading an instance of netdisco2 running on RHEL6, to a new
> > instance on RHEL7. We never do in server upgrades, so is there quick
> > instructions on migrating the database? I assume we would do a 'clean
> > install' and then a db export and import?
> >
> > Thanks in advance.
> >
>
> Yes that's exactly the way to do it, and it works well.
>
> 1) Install on RHEL7 as per normal installation instructions*, then stop
> the backend and web processes
>
> 2) on RHEL6, use pg_dump to create a backup. Use these options:
> -c, --clean clean (drop) database objects before recreating
> -C, --create include commands to create database in dump
>
> e.g. pg_dump -c -C netdisco > netdisco_dump.sql
>
> This will create a dump that drops and recreates the empty DB on RHEL7
>
> 3) on RHEL7, import with psql < netdisco_dump.sql with the postgres user
>
> 4) since now you have an older DB schema, run the netdisco-deploy from
> the installation instructions* one more time, the restart the backend
> and web processes
>
>
> This is all typed from memory of a recent migration, I hope I didn't
> miss anything and it works for you too, otherwise tell us where it goes
> wrong.
>
> Cheers
> Christian
>
>
> * https://metacpan.org/pod/App::Netdisco#Installation
>
--
°(((=((===°°°(((================================================
--- End Message ---
--- Begin Message ---
On 16.01.20 18:30, Ricardo Stella wrote:
>
> Hmm - getting the following:
>
> [netdisco@netdisco2 ~]$ pg_dump -c -C netdisco > /tmp/netdisco_dump.sql
> pg_dump: [archiver] -C and -c are incompatible options
>
> Would the output done by backups be sufficient?
>
> pg_dump -F c --create -f
> /home/netdisco/BACKUPS/netdisco-pgsql-$DATE.dump netdisco
>
> The lowercase 'c' above is for the format.
Ah I see, the description I posted assumes to be using the plaintext
format (-F p).
You can certainly make it work with -F c, but then you need to use
pg_restore instead of pg_dump to restore it, and just specify there that
you want to replace the database.
Cheers
Christian
>
> Thanks in advance - Ricardo.
>
> On Wed, Jan 15, 2020 at 6:21 PM Christian Ramseyer <[email protected]
> <mailto:[email protected]>> wrote:
>
>
>
> On 15.01.20 23:15, Ricardo Stella wrote:
> >
> > Hi,
> >
> > Looking at upgrading an instance of netdisco2 running on RHEL6, to
> a new
> > instance on RHEL7. We never do in server upgrades, so is there quick
> > instructions on migrating the database? I assume we would do a 'clean
> > install' and then a db export and import?
> >
> > Thanks in advance.
> >
>
> Yes that's exactly the way to do it, and it works well.
>
> 1) Install on RHEL7 as per normal installation instructions*, then stop
> the backend and web processes
>
> 2) on RHEL6, use pg_dump to create a backup. Use these options:
> -c, --clean clean (drop) database objects before recreating
> -C, --create include commands to create database in dump
>
> e.g. pg_dump -c -C netdisco > netdisco_dump.sql
>
> This will create a dump that drops and recreates the empty DB on RHEL7
>
> 3) on RHEL7, import with psql < netdisco_dump.sql with the postgres
> user
>
> 4) since now you have an older DB schema, run the netdisco-deploy from
> the installation instructions* one more time, the restart the backend
> and web processes
>
>
> This is all typed from memory of a recent migration, I hope I didn't
> miss anything and it works for you too, otherwise tell us where it goes
> wrong.
>
> Cheers
> Christian
>
>
> * https://metacpan.org/pod/App::Netdisco#Installation
>
>
>
> --
> °(((=((===°°°(((================================================
--- End Message ---
--- Begin Message ---
Thank you!
Was able to restore now and data is good now...
On Thu, Jan 16, 2020 at 1:30 PM Christian Ramseyer <[email protected]>
wrote:
>
>
> On 16.01.20 18:30, Ricardo Stella wrote:
> >
> > Hmm - getting the following:
> >
> > [netdisco@netdisco2 ~]$ pg_dump -c -C netdisco > /tmp/netdisco_dump.sql
> > pg_dump: [archiver] -C and -c are incompatible options
> >
> > Would the output done by backups be sufficient?
> >
> > pg_dump -F c --create -f
> > /home/netdisco/BACKUPS/netdisco-pgsql-$DATE.dump netdisco
> >
> > The lowercase 'c' above is for the format.
>
> Ah I see, the description I posted assumes to be using the plaintext
> format (-F p).
>
> You can certainly make it work with -F c, but then you need to use
> pg_restore instead of pg_dump to restore it, and just specify there that
> you want to replace the database.
>
> Cheers
> Christian
>
> >
> > Thanks in advance - Ricardo.
> >
> > On Wed, Jan 15, 2020 at 6:21 PM Christian Ramseyer <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >
> >
> > On 15.01.20 23:15, Ricardo Stella wrote:
> > >
> > > Hi,
> > >
> > > Looking at upgrading an instance of netdisco2 running on RHEL6, to
> > a new
> > > instance on RHEL7. We never do in server upgrades, so is there
> quick
> > > instructions on migrating the database? I assume we would do a
> 'clean
> > > install' and then a db export and import?
> > >
> > > Thanks in advance.
> > >
> >
> > Yes that's exactly the way to do it, and it works well.
> >
> > 1) Install on RHEL7 as per normal installation instructions*, then
> stop
> > the backend and web processes
> >
> > 2) on RHEL6, use pg_dump to create a backup. Use these options:
> > -c, --clean clean (drop) database objects before recreating
> > -C, --create include commands to create database in dump
> >
> > e.g. pg_dump -c -C netdisco > netdisco_dump.sql
> >
> > This will create a dump that drops and recreates the empty DB on
> RHEL7
> >
> > 3) on RHEL7, import with psql < netdisco_dump.sql with the postgres
> > user
> >
> > 4) since now you have an older DB schema, run the netdisco-deploy
> from
> > the installation instructions* one more time, the restart the backend
> > and web processes
> >
> >
> > This is all typed from memory of a recent migration, I hope I didn't
> > miss anything and it works for you too, otherwise tell us where it
> goes
> > wrong.
> >
> > Cheers
> > Christian
> >
> >
> > * https://metacpan.org/pod/App::Netdisco#Installation
> >
> >
> >
> > --
> > °(((=((===°°°(((================================================
>
--
°(((=((===°°°(((================================================
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users