Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-19 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Andrew Sackville-West wrote:

 On Wed, Sep 16, 2009 at 10:14:40AM -0400, Robert P. J. Day wrote:
  On Wed, 16 Sep 2009, Sven Joachim wrote:
 
   On 2009-09-16 15:49 +0200, Robert P. J. Day wrote:
  
  a question about mysql.  i want to reproduce all the mysql
databases on the new system.  is it sufficient to copy all of
/var/lib/mysql? is that where the databases are physically
stored? as opposed to doing mysql dumps and restores?
  
   I'm no database exports, but copying the files is only safe to
   do when the SQL server is not running.  Dumps and restores are
   the officially recommended way, AFAIK.
 
i have the freedom to shut down the mysql server after hours.
  so would that be the *only* issue?  as in, once the server isn't
  running, is doing a straight copy of /var/lib/mysql a perfectly
  safe and valid thing to do?  and i'm assuming i'd want to
  reproduce any configuration changes under /etc/mysql as well.  so
  that would work just fine, would it?  excellent.

 I can't answer the question about copying /var/lib/mysql, though,
 since the destination isn't live, you could certainly try it. If it
 fails, you are only out some copying time.

 But one thing you might consider with the db migration, is to move
 *only* the db after hours and have your services on the old machine
 connect to the db on the new machine. Then you can verify that it is
 all working and even run your services live on that db on the 64 bit
 machine while you continue the migration.

  nice idea, but i don't have that option as there will be a physical
switchover where the current server is taken offline at the same
moment the new one comes on at the same IP address.  well, i guess i
*could* do it that way but it seems easier to just wait for a quiet
time, turn off the current mysql server, then copy the DBs shortly
before the switch.

  which brings me back to my original question -- even though i know
doing official mysql backups and restores are the *official* way to
migrate the databases, as long as i can stop mysql on the current
server, can i just then copy the entire /var/lib/mysql directory over
to the new system to move the databases?  or more specifically, just
those /var/lib/mysql subdirectories corresponding to the databases i
want to move?  is that *technically* a valid thing to do?  (even if it
makes some people wince.  :-)

rday

p.s.  curiously, on the new system waiting for all that migrating
data, /var/lib/mysql has three entries that don't exist on the current
system:

ibdata1  ib_logfile0  ib_logfile1

not sure what those are, but they're sizable.  maybe i *will* do the
dump/restore thing, just to play it safe after all.
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-17 Thread Emanoil Kotsev
Jochen Schulz wrote:

 Emanoil Kotsev:
 
 You are right, that I'm not targeting the same approach. Migration of
 data and services involves too much manual work. However I was thinking
 that after replacing the package sources in source.list you could force
 reinstall if every single package that has the status installed, pulling
 from amd64 should bring the packages to the 64 code. For sure there would
 be also some manual work to do, but less.
 
 Do you think it's possible?
 
 Don't you read the replies to your mails? There is no way to tell apt
 which architecture to fetch packages for. Not in sources.list nor
 anywhere else.
 
 J.

You mean that if I say 

debootstrap --verbose lenny testdeb/

There is no way to let it know that I want amd64... I've got the point!

I do read the replies. At least I believe so.

But then the installation instruction above should be possible to accomplish
if I boot from live cd (amd64) and execute from there.

Thanks for the discussion. It's really interesting to me, because I'm
planning such a move in the next few months

regards



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-17 Thread Jochen Schulz
Emanoil Kotsev:
 Jochen Schulz wrote:
 
 Don't you read the replies to your mails? There is no way to tell apt
 which architecture to fetch packages for. Not in sources.list nor
 anywhere else.
 
 You mean that if I say 
 
 debootstrap --verbose lenny testdeb/
 
 There is no way to let it know that I want amd64... I've got the point!

No, that's not what I said. debootstrap has an '--arch' option which you
can use. But *after that* (or after a regular installation using d-i),
there is no (officially supported, efficient) way to switch the
architecture of the installation.

J.
-- 
I enjoy shopping, eating, sex and doing jigsaw puzzles of idealised
landscapes.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-17 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Sven Joachim wrote:

 On 2009-09-16 15:57 +0200, Sjoerd Hardeman wrote:

  Kept thinking a bit longer: are the uids and gids of daemon users
  actually determined during install? My experience is that these
  users actually preserve their uid over installations quite well.

 This is only true for users with a UID  100, as these are defined
 and maintained by the base-passwd package.  System users with a
 higher UID get their UID and GID allocated at package installation
 time and use the first ones that are available.  So these vary
 greatly between systems.

  so, just to put this part of the thread to bed, as i read it, the
easiest way to now migrate over the users and groups from the old
system is to take the three files:

  * /etc/passwd
  * /etc/shadow
  * /etc/group

strip copies of them down to just their non-system users and groups,
and append what's left to their respective files on the new install.
from my experience with numerous forms of linux and unix, just those
three files define the system users and groups.

  note that doing the above does nothing about configuring *other*
software or features for user or group access -- copying the
respective home directories, adding users' access to things like, say,
/etc/ftpusers and so on.  that's different.  i'm talking simply about
defining the *existence* of those users and groups, nothing more.

  are there any files or directories in addition to the above three i
need to worry about?  thanks.

rday

p.s.  once all this is done, i really do plan on summarizing what i
had to go through so others can take advantage of it.

--




Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-17 Thread Emanoil Kotsev
Jochen Schulz wrote:

 Emanoil Kotsev:
 Jochen Schulz wrote:
 
 Don't you read the replies to your mails? There is no way to tell apt
 which architecture to fetch packages for. Not in sources.list nor
 anywhere else.
 
 You mean that if I say
 
 debootstrap --verbose lenny testdeb/
 
 There is no way to let it know that I want amd64... I've got the point!
 
 No, that's not what I said. debootstrap has an '--arch' option which you

I'm really not understanding you completely well. But still the point is
important. From the man page I do not understand what exactly is supposed
to be the argument but I assume amd64, i386, ia64 etc, as if a it's sooo
obvious.

man  debootstrap
   --arch=ARCH
  Set the target architecture (use if dpkg isn’t installed). 
See also --foreign.


--foreign
  Do  the  initial unpack phase of bootstrapping only, for
example if the target architecture does not match
  the host architecture.  A copy of debootstrap sufficient for
completing  the  bootstrap  process  will  be
  installed as /debootstrap/debootstrap in the target
filesystem.

 can use. But *after that* (or after a regular installation using d-i),
 there is no (officially supported, efficient) way to switch the
 architecture of the installation.
 
 J.

What do you mean way to switch the  ? You mean perhaps once installed
you can not easily switch. This means I would add i.e. a disk to my server,
boot in 32 as usual, partition, format and debootstrap --arch=amd64. Make
the disk bootable and reboot in this disk.
Actually by writing this I'm thinking that usually administrators do install
the system on extra partition(s) (/, /var, /usr etc) so I could use a USB
disk to install on it, reboot and after migration is done I could delete
the system partition(s) and copy the new system over from the USB disk.

This does look much easier to accomplish now.

Thanks and regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-17 Thread Sjoerd Hardeman

Emanoil Kotsev schreef:

can use. But *after that* (or after a regular installation using d-i),
there is no (officially supported, efficient) way to switch the
architecture of the installation.

J.


What do you mean way to switch the  ? You mean perhaps once installed
you can not easily switch. This means I would add i.e. a disk to my server,
boot in 32 as usual, partition, format and debootstrap --arch=amd64. Make
the disk bootable and reboot in this disk.
Actually by writing this I'm thinking that usually administrators do install
the system on extra partition(s) (/, /var, /usr etc) so I could use a USB
disk to install on it, reboot and after migration is done I could delete
the system partition(s) and copy the new system over from the USB disk.
That is of course quite possible. But the point was if 'updating' your 
system from i386 to amd64 on the fly, e.g. on the same partition, is 
possible without the aid of live cds and so on. As posted before, the 
answer is 'yes, but don't dare to try'. At least, that is my understanding.




signature.asc
Description: OpenPGP digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-17 Thread Emanoil Kotsev
Sjoerd Hardeman wrote:

 That is of course quite possible. But the point was if 'updating' your
 system from i386 to amd64 on the fly, e.g. on the same partition, is
 possible without the aid of live cds and so on. As posted before, the
 answer is 'yes, but don't dare to try'. At least, that is my
 understanding.

OK, thanks. I understood that it is not possible to tell  update to
different arch. Now we have to make a plan what's the most easy way to
migrate from 32 to 64

regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day

  i've mentioned this before, but by the end of this week, i want to
move my entire current (fully-updated) lenny install from an old
32-bit system to a new 64-bit dell server, and i'm open to advice on
the easiest and most error-free way to do that.

  i've already duplicated the software packages on the new server, so
what's left is to transfer over the remainder of the configuration --
mail server, web server, user accounts, etc.  the whole ball of wax.

  since both systems have webmin, someone suggested doing a webmin
backup on the old system, then just restoring it on the new one, which
makes a certain amount of sense as long as webmin can be trusted to
reproduce configuration info accurately.

  i don't think this will be that difficult, but if there's a tool to
make this easier, i'm open to suggestions.  thanks.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sjoerd Hardeman

Robert P. J. Day schreef:

  i've mentioned this before, but by the end of this week, i want to
move my entire current (fully-updated) lenny install from an old
32-bit system to a new 64-bit dell server, and i'm open to advice on
the easiest and most error-free way to do that.

  i've already duplicated the software packages on the new server, so
what's left is to transfer over the remainder of the configuration --
mail server, web server, user accounts, etc.  the whole ball of wax.

  since both systems have webmin, someone suggested doing a webmin
backup on the old system, then just restoring it on the new one, which
makes a certain amount of sense as long as webmin can be trusted to
reproduce configuration info accurately.
Why not just copy /etc, /home, /root and /var, and make sure you do not 
follw symlinks in copying. That should do.


Sjoerd



signature.asc
Description: OpenPGP digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Onur Aslan
I suggest you to use low level tools, such as dd or cpio. After copying all
files, install grub to your boot device, configure it and fstab (if your device
order is different) and finish installation. This can be done without any pain.

On Wed, Sep 16, 2009 at 07:21:52AM -0400, Robert P. J. Day wrote:
 
   i've mentioned this before, but by the end of this week, i want to
 move my entire current (fully-updated) lenny install from an old
 32-bit system to a new 64-bit dell server, and i'm open to advice on
 the easiest and most error-free way to do that.
 
   i've already duplicated the software packages on the new server, so
 what's left is to transfer over the remainder of the configuration --
 mail server, web server, user accounts, etc.  the whole ball of wax.
 
   since both systems have webmin, someone suggested doing a webmin
 backup on the old system, then just restoring it on the new one, which
 makes a certain amount of sense as long as webmin can be trusted to
 reproduce configuration info accurately.
 
   i don't think this will be that difficult, but if there's a tool to
 make this easier, i'm open to suggestions.  thanks.
 
 rday
 --
 
 
 Robert P. J. Day   Waterloo, Ontario, CANADA
 
 Linux Consulting, Training and Annoying Kernel Pedantry.
 
 Web page:  http://crashcourse.ca
 Twitter:   http://twitter.com/rpjday
 
 
 
 -- 
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day

  please don't top-post.

On Wed, 16 Sep 2009, Onur Aslan wrote:

 I suggest you to use low level tools, such as dd or cpio. After
 copying all files, install grub to your boot device, configure it
 and fstab (if your device order is different) and finish
 installation. This can be done without any pain.

 On Wed, Sep 16, 2009 at 07:21:52AM -0400, Robert P. J. Day wrote:
 
i've mentioned this before, but by the end of this week, i want
  to move my entire current (fully-updated) lenny install from an
  old 32-bit system to a new 64-bit dell server, and i'm open to
  advice on the easiest and most error-free way to do that.
 
i've already duplicated the software packages on the new server,
  so what's left is to transfer over the remainder of the
  configuration -- mail server, web server, user accounts, etc.
  the whole ball of wax.
 
since both systems have webmin, someone suggested doing a webmin
  backup on the old system, then just restoring it on the new one,
  which makes a certain amount of sense as long as webmin can be
  trusted to reproduce configuration info accurately.
 
i don't think this will be that difficult, but if there's a tool
  to make this easier, i'm open to suggestions.  thanks.

  this doesn't really address my question.  dd would not be a good
choice as i already *have* the fundamental system set up in terms of
software.  all that's left is to copy over the additional
*configuration* and *data* represented by the old system, for which dd
would be a very bad choice, indeed.

  cpio is a better choice, but the decisions to be made there would
be *which* files and directories to copy to reproduce the old system
in its entirety as a mail server, web server, ftp server and so on.

rday

p.s.  i don't want to sound a bit short, but there seems to be an
annoying pattern on this mailing list that people don't actually
*read* the question i'm asking before attempting to answer it.

to recap, the new (64-bit) server has been installed with lenny
(5.0.3, in fact).  it's bootable, grub is fine, it's been set up with
LVM.  in short, it's a perfectly respectable and running 64-bit
system.  what i'm after are any potential tools that assist me in
migrating the config and data info from an existing (32-bit) server.
and since pretty much all the software is installed, the difference in
bit size shouldn't make a big difference in what's left to be
migrated, given that what's left is primarily data.

--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Onur Aslan
On Wed, Sep 16, 2009 at 07:58:26AM -0400, Robert P. J. Day wrote:
 
   please don't top-post.
 
I am not doing. This is my 3rd post to the list.

 p.s.  i don't want to sound a bit short, but there seems to be an
 annoying pattern on this mailing list that people don't actually
 *read* the question i'm asking before attempting to answer it.

You are right, I act a little hasty please don't blame the list and I am sorry
about that.

Indeed my suggestion is the start all over again with dd but you want to use
a 64bit system which I didn't saw in the question. Also you didn't mention to
use a amd64 port in your new system. I don't want to start an argument.
Please accept the apology and ignore this post and don't do any prejudice about
Debian community or list.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Jochen Schulz
Sjoerd Hardeman:

 Why not just copy /etc, /home, /root and /var, and make sure you do not  
 follw symlinks in copying. That should do.

Not quite. This might lead to problems when UIDs have changed. Some
packages (say, Apache) create new users and files which belong to these
users. Even if you install the same set of packages on a new system, you
have no guarantee that these users are created in the same order (and
hence with the same UIDs/GIDs).

My approach would be to set up every service manually by copying the
relevant config files and checking whether they need any customization
(hostname, IP addresses come to mind). I give in that's very
labour-intensive, but I cannot think of a better way (in terms of
reliability).

J.
-- 
If I was Mark Chapman I would have shot John Lennon with a water pistol.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sven Joachim
On 2009-09-16 13:46 +0200, Sjoerd Hardeman wrote:

 Robert P. J. Day schreef:
   i've mentioned this before, but by the end of this week, i want to
 move my entire current (fully-updated) lenny install from an old
 32-bit system to a new 64-bit dell server, and i'm open to advice on
 the easiest and most error-free way to do that.

   i've already duplicated the software packages on the new server, so
 what's left is to transfer over the remainder of the configuration --
 mail server, web server, user accounts, etc.  the whole ball of wax.

   since both systems have webmin, someone suggested doing a webmin
 backup on the old system, then just restoring it on the new one, which
 makes a certain amount of sense as long as webmin can be trusted to
 reproduce configuration info accurately.
 Why not just copy /etc, /home, /root and /var, and make sure you do
 not follw symlinks in copying. That should do.

No, at least you need to leave out /var/lib/{dpkg,apt}.  And you have to
be careful to preserve file ownership -- the uids and gids of system
users and groups may differ.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sjoerd Hardeman

Jochen Schulz schreef:

Sjoerd Hardeman:
Why not just copy /etc, /home, /root and /var, and make sure you do not  
follw symlinks in copying. That should do.


Not quite. This might lead to problems when UIDs have changed. Some
packages (say, Apache) create new users and files which belong to these
users. Even if you install the same set of packages on a new system, you
have no guarantee that these users are created in the same order (and
hence with the same UIDs/GIDs).

My approach would be to set up every service manually by copying the
relevant config files and checking whether they need any customization
(hostname, IP addresses come to mind). I give in that's very
labour-intensive, but I cannot think of a better way (in terms of
reliability).
Indeed, you should use cp -p or rsync -a as this copies permissions and 
users. If you then also copy /etc/passwd and /etc/group you'll have a 
matching set of permissions/users/groups.


Sjoerd



signature.asc
Description: OpenPGP digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sjoerd Hardeman

Sven Joachim schreef:

On 2009-09-16 13:46 +0200, Sjoerd Hardeman wrote:


Robert P. J. Day schreef:

  i've mentioned this before, but by the end of this week, i want to
move my entire current (fully-updated) lenny install from an old
32-bit system to a new 64-bit dell server, and i'm open to advice on
the easiest and most error-free way to do that.

  i've already duplicated the software packages on the new server, so
what's left is to transfer over the remainder of the configuration --
mail server, web server, user accounts, etc.  the whole ball of wax.

  since both systems have webmin, someone suggested doing a webmin
backup on the old system, then just restoring it on the new one, which
makes a certain amount of sense as long as webmin can be trusted to
reproduce configuration info accurately.

Why not just copy /etc, /home, /root and /var, and make sure you do
not follw symlinks in copying. That should do.


No, at least you need to leave out /var/lib/{dpkg,apt}.  And you have to
be careful to preserve file ownership -- the uids and gids of system
users and groups may differ.
Forgot about those, you're probably right. So the idea would then be to 
do an rsync -a or cp -p of /etc/, /home and /root, and in /var to at 
least copy /var/mail /var/spool, /var/log and /var/www, and carefully 
check what you need from /var/lib. Am I right?


Sjoerd



signature.asc
Description: OpenPGP digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Jochen Schulz
Sjoerd Hardeman:
 Jochen Schulz schreef:
 
 Not quite. This might lead to problems when UIDs have changed. Some
 packages (say, Apache) create new users and files which belong to these
 users. Even if you install the same set of packages on a new system, you
 have no guarantee that these users are created in the same order (and
 hence with the same UIDs/GIDs).
 
 Indeed, you should use cp -p or rsync -a as this copies permissions and  
 users. If you then also copy /etc/passwd and /etc/group you'll have a  
 matching set of permissions/users/groups.

But then you still have to check the directories you didn't copy over to
the new system for files with the wrong owner. And the problems
concerning hostnames and IP addresses have to be solved as well.

J.
-- 
If nightclub doormen recognised me I would be more fulfilled.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Sjoerd Hardeman wrote:

 Robert P. J. Day schreef:
i've mentioned this before, but by the end of this week, i want
  to move my entire current (fully-updated) lenny install from an
  old 32-bit system to a new 64-bit dell server, and i'm open to
  advice on the easiest and most error-free way to do that.
 
i've already duplicated the software packages on the new server,
  so what's left is to transfer over the remainder of the
  configuration -- mail server, web server, user accounts, etc.
  the whole ball of wax.
 
since both systems have webmin, someone suggested doing a webmin
  backup on the old system, then just restoring it on the new one,
  which makes a certain amount of sense as long as webmin can be
  trusted to reproduce configuration info accurately.

 Why not just copy /etc, /home, /root and /var, and make sure you do
 not follw symlinks in copying. That should do.

  that's sort of the idea i had in mind, but not quite that
brute-force.  after some reflection, i'm willing to spend a little
more time migrating stuff over subsystem by subsystem, just to give me
the chance to see how those things fit together.

  for example, obviously i'm going to (mindlessly) copy over all of
/home, but for that to make sense, i'll need to reproduce the
/etc/{passwd,group,shadow} files, plus perhaps /etc/profile and
related files, and anything that was added to the PAM subsystem
regarding user settings.  it's a bit more work, but it would be more
educational.  so, in that specific case, i'd be interested in all of
the files that contain any information related to users and groups.

  regarding /var, i wouldn't want to copy over all of it since i have
no interest in all the log files, which wouldn't be relevant to the
new system.  so i'd have to be more selective.  but i *would* want to
copy over anything under /var that *would* reflect any configuration
or data.

  a question about mysql.  i want to reproduce all the mysql databases
on the new system.  is it sufficient to copy all of /var/lib/mysql?
is that where the databases are physically stored?  as opposed to
doing mysql dumps and restores?

  anyway, that's what i'm thinking -- one subsystem or component at a
time, so i can appreciate the distinctions between all the parts.  ftp
server.  mail server.  web server and configuration.

  good idea?  too much work?  thoughts?

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Sven Joachim wrote:

 On 2009-09-16 13:46 +0200, Sjoerd Hardeman wrote:

  Robert P. J. Day schreef:
i've mentioned this before, but by the end of this week, i want to
  move my entire current (fully-updated) lenny install from an old
  32-bit system to a new 64-bit dell server, and i'm open to advice on
  the easiest and most error-free way to do that.
 
i've already duplicated the software packages on the new server, so
  what's left is to transfer over the remainder of the configuration --
  mail server, web server, user accounts, etc.  the whole ball of wax.
 
since both systems have webmin, someone suggested doing a webmin
  backup on the old system, then just restoring it on the new one, which
  makes a certain amount of sense as long as webmin can be trusted to
  reproduce configuration info accurately.

  Why not just copy /etc, /home, /root and /var, and make sure you
  do not follw symlinks in copying. That should do.

 No, at least you need to leave out /var/lib/{dpkg,apt}.  And you
 have to be careful to preserve file ownership -- the uids and gids
 of system users and groups may differ.

  right, see my previous post.  i already have the new running system,
so i don't want to overwrite install or log information with content
from the *old* system.  (is it just me, or does anyone else think that
/var has gotten a bit chaotic in that respect?)

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sjoerd Hardeman

Jochen Schulz schreef:

Sjoerd Hardeman:

Jochen Schulz schreef:

Not quite. This might lead to problems when UIDs have changed. Some
packages (say, Apache) create new users and files which belong to these
users. Even if you install the same set of packages on a new system, you
have no guarantee that these users are created in the same order (and
hence with the same UIDs/GIDs).
Indeed, you should use cp -p or rsync -a as this copies permissions and  
users. If you then also copy /etc/passwd and /etc/group you'll have a  
matching set of permissions/users/groups.


But then you still have to check the directories you didn't copy over to
the new system for files with the wrong owner. And the problems
concerning hostnames and IP addresses have to be solved as well.
Kept thinking a bit longer: are the uids and gids of daemon users 
actually determined during install? My experience is that these users 
actually preserve their uid over installations quite well.
And what problems do you see with hosts names/ip's? I assume at some 
point the new machine should *become* the old machine, so mathcing ip's 
and hostnames is then exaclty what you need. Of course, during the 
process of copying, you do need to be careful.




signature.asc
Description: OpenPGP digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sven Joachim
On 2009-09-16 15:49 +0200, Robert P. J. Day wrote:

   a question about mysql.  i want to reproduce all the mysql databases
 on the new system.  is it sufficient to copy all of /var/lib/mysql?
 is that where the databases are physically stored?  as opposed to
 doing mysql dumps and restores?

I'm no database exports, but copying the files is only safe to do when
the SQL server is not running.  Dumps and restores are the officially
recommended way, AFAIK.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sven Joachim
On 2009-09-16 15:57 +0200, Sjoerd Hardeman wrote:

 Kept thinking a bit longer: are the uids and gids of daemon users
 actually determined during install? My experience is that these users
 actually preserve their uid over installations quite well.

This is only true for users with a UID  100, as these are defined and
maintained by the base-passwd package.  System users with a higher UID
get their UID and GID allocated at package installation time and use the
first ones that are available.  So these vary greatly between systems.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sven Joachim
On 2009-09-16 16:03 +0200, Sven Joachim wrote:

 I'm no database exports,
  ^^^

Err, that should read expert, of course.

Sven 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Sven Joachim wrote:

 On 2009-09-16 15:49 +0200, Robert P. J. Day wrote:

a question about mysql.  i want to reproduce all the mysql
  databases on the new system.  is it sufficient to copy all of
  /var/lib/mysql? is that where the databases are physically stored?
  as opposed to doing mysql dumps and restores?

 I'm no database exports, but copying the files is only safe to do
 when the SQL server is not running.  Dumps and restores are the
 officially recommended way, AFAIK.

  i have the freedom to shut down the mysql server after hours.  so
would that be the *only* issue?  as in, once the server isn't running,
is doing a straight copy of /var/lib/mysql a perfectly safe and valid
thing to do?  and i'm assuming i'd want to reproduce any configuration
changes under /etc/mysql as well.  so that would work just fine, would
it?  excellent.

rday

p.s.  it occurs to me that i *might* want to copy over the mysql logs
as well.  that's where it gets tricky -- in some cases, i really might
want to reproduce the old system's history and log files; in other
cases, no.  this isn't as simple as i first suspected -- it's just
going to take some careful planning.  once i'm done, maybe i should
write about it. :-)

--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Sjoerd Hardeman wrote:

 Kept thinking a bit longer: are the uids and gids of daemon users
 actually determined during install? My experience is that these
 users actually preserve their uid over installations quite well.

  nope.  for example, on the old system, openldap account has a UID of
114.  on new system, 105.  numerous other daemon UID differences as
well.  so a straight copy isn't going to work here.  this just gets
trickier and trickier.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sjoerd Hardeman

Sven Joachim schreef:

On 2009-09-16 15:57 +0200, Sjoerd Hardeman wrote:


Kept thinking a bit longer: are the uids and gids of daemon users
actually determined during install? My experience is that these users
actually preserve their uid over installations quite well.


This is only true for users with a UID  100, as these are defined and
maintained by the base-passwd package.  System users with a higher UID
get their UID and GID allocated at package installation time and use the
first ones that are available.  So these vary greatly between systems.

Then I learned something. Thanks for the info.



signature.asc
Description: OpenPGP digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Sven Joachim wrote:

 On 2009-09-16 15:57 +0200, Sjoerd Hardeman wrote:

  Kept thinking a bit longer: are the uids and gids of daemon users
  actually determined during install? My experience is that these
  users actually preserve their uid over installations quite well.

 This is only true for users with a UID  100, as these are defined
 and maintained by the base-passwd package.  System users with a
 higher UID get their UID and GID allocated at package installation
 time and use the first ones that are available.  So these vary
 greatly between systems.

  where are these boundaries defined?  i'm familiar with such values
being defined in places like /etc/default/{login,useradd, ???).  from
looking at /etc/passwd and from what you're written above,

* UIDs of  100 and 65534 (nobody) are fixed and immutable
* UIDs of [100-999] represent packages/daemons that are given
  out as necessary as packages are installed so they don't have
  to match and i should leave them as is
* UIDs of 1000 and up are for manually-created accounts, and i
  *should* reproduce them exactly from the old system to the
  new system

seems pretty straightforward, much like i've seen on other linux
systems.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Sven Joachim wrote:

 On 2009-09-16 15:57 +0200, Sjoerd Hardeman wrote:

  Kept thinking a bit longer: are the uids and gids of daemon users
  actually determined during install? My experience is that these
  users actually preserve their uid over installations quite well.

 This is only true for users with a UID  100, as these are defined
 and maintained by the base-passwd package.  System users with a
 higher UID get their UID and GID allocated at package installation
 time and use the first ones that are available.  So these vary
 greatly between systems.

  is there no bulk account creation utility on debian for just this
sort of thing?  i know i've seen this sort of thing before on fedora,
i just can't remember what it's called.

  essentially, you feed the utility a list of lines from an existing
/etc/passwd file, and it runs the appropriate commands to create the
corresponding accounts on a new system.  all you need to do is strip a
copy of the /etc/passwd file to the point where it contains only those
users whose UIDs are 1000 and up, since you don't want to touch
anything else.

  no such thing?  i would have thought that that sort of thing is
*exactly* what you want for migrations.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Sven Joachim
On 2009-09-16 16:25 +0200, Robert P. J. Day wrote:

 On Wed, 16 Sep 2009, Sven Joachim wrote:

 This is only true for users with a UID  100, as these are defined
 and maintained by the base-passwd package.  System users with a
 higher UID get their UID and GID allocated at package installation
 time and use the first ones that are available.  So these vary
 greatly between systems.

   where are these boundaries defined?  i'm familiar with such values
 being defined in places like /etc/default/{login,useradd, ???).  from
 looking at /etc/passwd and from what you're written above,

 * UIDs of  100 and 65534 (nobody) are fixed and immutable
 * UIDs of [100-999] represent packages/daemons that are given
   out as necessary as packages are installed so they don't have
   to match and i should leave them as is
 * UIDs of 1000 and up are for manually-created accounts, and i
   *should* reproduce them exactly from the old system to the
   new system

It's almost like that.  The details are in the Debian Policy Manual,
§9.2.2: http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.2.2.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Jochen Schulz
Robert P. J. Day:
 
   anyway, that's what i'm thinking -- one subsystem or component at a
 time, so i can appreciate the distinctions between all the parts.  ftp
 server.  mail server.  web server and configuration.
 
   good idea?  too much work?  thoughts?

As I already said: it clearly is too much work this way, but in order to
make sure every service works as expected on the new machine, this is
exactly the way I would do it. But then I am not a real sysadmin, just a
programmer.

J.
-- 
I lust after strangers but only date people from the office.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Andrei Popescu
On Wed,16.Sep.09, 07:21:52, Robert P. J. Day wrote:
 
   i've mentioned this before, but by the end of this week, i want to
 move my entire current (fully-updated) lenny install from an old
 32-bit system to a new 64-bit dell server, and i'm open to advice on
 the easiest and most error-free way to do that.

Hello Robert,

I see you already have the new system installed. Not very helpful for 
now, but for your next migration it might be easier if you first copy 
over passwd, group, shadow...  and then install the server packages (the 
ones that create users in the 101-999 range). This way you would be able 
to copy most (all?) data files over without worrying about UID mismatch.

Regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Andrew Sackville-West
On Wed, Sep 16, 2009 at 10:14:40AM -0400, Robert P. J. Day wrote:
 On Wed, 16 Sep 2009, Sven Joachim wrote:
 
  On 2009-09-16 15:49 +0200, Robert P. J. Day wrote:
 
 a question about mysql.  i want to reproduce all the mysql
   databases on the new system.  is it sufficient to copy all of
   /var/lib/mysql? is that where the databases are physically stored?
   as opposed to doing mysql dumps and restores?
 
  I'm no database exports, but copying the files is only safe to do
  when the SQL server is not running.  Dumps and restores are the
  officially recommended way, AFAIK.
 
   i have the freedom to shut down the mysql server after hours.  so
 would that be the *only* issue?  as in, once the server isn't running,
 is doing a straight copy of /var/lib/mysql a perfectly safe and valid
 thing to do?  and i'm assuming i'd want to reproduce any configuration
 changes under /etc/mysql as well.  so that would work just fine, would
 it?  excellent.

I can't answer the question about copying /var/lib/mysql, though,
since the destination isn't live, you could certainly try it. If it
fails, you are only out some copying time. 

But one thing you might consider with the db migration, is to move
*only* the db after hours and have your services on the old machine
connect to the db on the new machine. Then you can verify that it is
all working and even run your services live on that db on the 64 bit
machine while you continue the migration.

.02

A


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Emanoil Kotsev
Andrei Popescu wrote:

 On Wed,16.Sep.09, 07:21:52, Robert P. J. Day wrote:
 
   i've mentioned this before, but by the end of this week, i want to
 move my entire current (fully-updated) lenny install from an old
 32-bit system to a new 64-bit dell server, and i'm open to advice on
 the easiest and most error-free way to do that.
 
 Hello Robert,
 
 I see you already have the new system installed. Not very helpful for
 now, but for your next migration it might be easier if you first copy
 over passwd, group, shadow...  and then install the server packages (the
 ones that create users in the 101-999 range). This way you would be able
 to copy most (all?) data files over without worrying about UID mismatch.
 
 Regards,
 Andrei


Hi, this is a question I was going to ask in few weeks as I planned to learn
how I can migrate from 32 to 64 bit debian distro.

It looks like it's not possible to just upgrade i.e. replacing the sources
in apt/source.list?

Is it really that hard to switch from 32 to 64?

Is it not possible to replace the sources and i.e. dpkg --reinstall install
package?

thanks for the discussion

regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Andrei Popescu wrote:

 On Wed,16.Sep.09, 07:21:52, Robert P. J. Day wrote:
 
i've mentioned this before, but by the end of this week, i want to
  move my entire current (fully-updated) lenny install from an old
  32-bit system to a new 64-bit dell server, and i'm open to advice on
  the easiest and most error-free way to do that.

 Hello Robert,

 I see you already have the new system installed. Not very helpful
 for now, but for your next migration it might be easier if you first
 copy over passwd, group, shadow...  and then install the server
 packages (the ones that create users in the 101-999 range). This way
 you would be able to copy most (all?) data files over without
 worrying about UID mismatch.

  if i read this correctly, you're suggesting that if the server
packages already have entries (100-999) in the passwd/group/shadow
files (carried over from the old system), they'll keep the same UID?
yes, that would be convenient if it's true.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Jochen Schulz
Emanoil Kotsev:
 
 
 Hi, this is a question I was going to ask in few weeks as I planned to learn
 how I can migrate from 32 to 64 bit debian distro.
 
 It looks like it's not possible to just upgrade i.e. replacing the sources
 in apt/source.list?

You can try finding all occurences of i386 and replacing them with amd64
in your sources.list. But I doubt you will find any. ;-) To be serious:
apt determines the architecture for which to fetch packages by itself.
AFAIK, you cannot instruct it to use a different architecture.

 Is it really that hard to switch from 32 to 64?

Unfortunately, yes. Maybe this will change when MultiArch is finally
implemented, but I am not too optimistic that this will happen in the
near future.

J.
-- 
In idle moments I remember former lovers with sentimental tenderness.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Boyd Stephen Smith Jr.
On Wednesday 16 September 2009 12:16:32 Emanoil Kotsev wrote:
 Andrei Popescu wrote:
  On Wed,16.Sep.09, 07:21:52, Robert P. J. Day wrote:
i've mentioned this before, but by the end of this week, i want to
  move my entire current (fully-updated) lenny install from an old
  32-bit system to a new 64-bit dell server, and i'm open to advice on
  the easiest and most error-free way to do that.

 Hi, this is a question I was going to ask in few weeks as I planned to
 learn how I can migrate from 32 to 64 bit debian distro.

There is no official migration path.  Reinstall.

 It looks like it's not possible to just upgrade i.e. replacing the sources
 in apt/source.list?

Modern sources.list files do not have the architecture listed.  Apt pulls this 
information from dpkg.  Modifying your dpkg architecture is not supported.

 Is it really that hard to switch from 32 to 64?

Smoothly, yes.  Especially since current (Lenny) versions of the apt tools 
don't support multi-arch installations.  If multi-arch was in place it might 
be feasible, but still very difficult since there should be times during the 
switch that essential packages were missing, not configured, or otherwise non-
functional.

 Is it not possible to replace the sources and i.e. dpkg --reinstall install
 package?

That could work for most packages, but the essential ones might bite you and 
leave you with a non-functional system.

Most applications don't gain a whole lot by running in 64-bit mode.  Using a 
64-bit kernel with a 32-bit installation is supported and may be acceptable 
until multi-arch provides an upgrade path OR you can take the time to re-
install.
-- 
Boyd Stephen Smith Jr.   ,= ,-_-. =.
b...@iguanasuicide.net  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/



signature.asc
Description: This is a digitally signed message part.


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Andrew Sackville-West
On Wed, Sep 16, 2009 at 07:16:32PM +0200, Emanoil Kotsev wrote:
 Andrei Popescu wrote:
 
  On Wed,16.Sep.09, 07:21:52, Robert P. J. Day wrote:
  
i've mentioned this before, but by the end of this week, i want to
  move my entire current (fully-updated) lenny install from an old
  32-bit system to a new 64-bit dell server, and i'm open to advice on
  the easiest and most error-free way to do that.
  
  Hello Robert,
  
  I see you already have the new system installed. Not very helpful for
  now, but for your next migration it might be easier if you first copy
  over passwd, group, shadow...  and then install the server packages (the
  ones that create users in the 101-999 range). This way you would be able
  to copy most (all?) data files over without worrying about UID mismatch.
  
  Regards,
  Andrei
 
 
 Hi, this is a question I was going to ask in few weeks as I planned to learn
 how I can migrate from 32 to 64 bit debian distro.
 

well, the OP here is really trying to migrate data and services from
one machine to another and coincidentally, the new machine is 64
bit. What you seem to be suggesting is different -- namely a migration
from 32 to 64 bit in place.

 It looks like it's not possible to just upgrade i.e. replacing the sources
 in apt/source.list?

I believe that is correct. It is almost certainly not supported. That
said, I have done it, as an exercise. The work involved is definitely
greater than would be involved in just reinstalling.

 
 Is it really that hard to switch from 32 to 64?

yes. you have to replace 32 bit binaries with 64 bit binaries on a
running system. That's not easy.

 
 Is it not possible to replace the sources and i.e. dpkg --reinstall install
 package?

partially sure, but it's more involved than that. Truly the easiest
solution is to do 

dpkg --get-selections  /some/safe/file/location/my_selections

reinstall the system with the 64 bit installer, preserving /home and
perhaps a few other places and then:

dpkg --set-selections  my_selections

and 

aptitude upgrade or whatever.

.02

A


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Andrew Sackville-West wrote:

 On Wed, Sep 16, 2009 at 07:16:32PM +0200, Emanoil Kotsev wrote:
  Andrei Popescu wrote:
 
   On Wed,16.Sep.09, 07:21:52, Robert P. J. Day wrote:
  
 i've mentioned this before, but by the end of this week, i
   want to move my entire current (fully-updated) lenny install
   from an old 32-bit system to a new 64-bit dell server, and i'm
   open to advice on the easiest and most error-free way to do
   that.
  
   Hello Robert,
  
   I see you already have the new system installed. Not very
   helpful for now, but for your next migration it might be easier
   if you first copy over passwd, group, shadow...  and then
   install the server packages (the ones that create users in the
   101-999 range). This way you would be able to copy most (all?)
   data files over without worrying about UID mismatch.
  
   Regards,
   Andrei
 
 
  Hi, this is a question I was going to ask in few weeks as I
  planned to learn how I can migrate from 32 to 64 bit debian
  distro.
 

 well, the OP here is really trying to migrate data and services from
 one machine to another and coincidentally, the new machine is 64
 bit. What you seem to be suggesting is different -- namely a
 migration from 32 to 64 bit in place.

  exactly.  using dpkg --get-selections and --set-selections, i did a
virgin install on the new 64-bit system to duplicate the packages on
the old system, now i'm just methodically copying over
arch-independent data and config files.  what you're asking is quite a
different question.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Andrei Popescu
On Wed,16.Sep.09, 13:24:12, Robert P. J. Day wrote:
 
   if i read this correctly, you're suggesting that if the server
 packages already have entries (100-999) in the passwd/group/shadow
 files (carried over from the old system), they'll keep the same UID?
 yes, that would be convenient if it's true.

Yes, groups created by a package are not removed, not even on purge (I 
still have the 'Debian-exim' user and group, though I purged it and 
replaced it with postfix). If that same package is reinstalled it will 
reuse the user:group, this is why it should work.

Regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Robert P. J. Day
On Wed, 16 Sep 2009, Andrei Popescu wrote:

 On Wed,16.Sep.09, 13:24:12, Robert P. J. Day wrote:
 
if i read this correctly, you're suggesting that if the server
  packages already have entries (100-999) in the passwd/group/shadow
  files (carried over from the old system), they'll keep the same
  UID? yes, that would be convenient if it's true.

 Yes, groups created by a package are not removed, not even on purge
 (I still have the 'Debian-exim' user and group, though I purged it
 and replaced it with postfix). If that same package is reinstalled
 it will reuse the user:group, this is why it should work.

  thanks, that's useful to know for next time.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Emanoil Kotsev
Andrei Popescu wrote:

 On Wed,16.Sep.09, 13:24:12, Robert P. J. Day wrote:
 
   if i read this correctly, you're suggesting that if the server
 packages already have entries (100-999) in the passwd/group/shadow
 files (carried over from the old system), they'll keep the same UID?
 yes, that would be convenient if it's true.
 
 Yes, groups created by a package are not removed, not even on purge (I
 still have the 'Debian-exim' user and group, though I purged it and
 replaced it with postfix). If that same package is reinstalled it will
 reuse the user:group, this is why it should work.
 

I think it depends on the packager decision and effort - some packages
remove the user some not.

but thanks I didn't know that I can use parts of older system and reinstall
new one - if this is what is described here and I'm understanding it
correct.

regards



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Emanoil Kotsev
Robert P. J. Day wrote:

 bit. What you seem to be suggesting is different -- namely a
 migration from 32 to 64 bit in place.
 
 exactly.  using dpkg --get-selections and --set-selections, i did a
 virgin install on the new 64-bit system to duplicate the packages on
 the old system, now i'm just methodically copying over
 arch-independent data and config files.  what you're asking is quite a
 different question.

You are right, that I'm not targeting the same approach. Migration of data
and services involves too much manual work. However I was thinking that
after replacing the package sources in source.list you could force
reinstall if every single package that has the status installed, pulling
from amd64 should bring the packages to the 64 code. For sure there would
be also some manual work to do, but less.

Do you think it's possible?

What I didn't think is that specific files like database files are probably
also using 32bit format.

regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Alex Samad
On Wed, Sep 16, 2009 at 04:11:17PM +0200, Sven Joachim wrote:
 On 2009-09-16 15:57 +0200, Sjoerd Hardeman wrote:
 
  Kept thinking a bit longer: are the uids and gids of daemon users
  actually determined during install? My experience is that these users
  actually preserve their uid over installations quite well.
 
 This is only true for users with a UID  100, as these are defined and
 maintained by the base-passwd package.  System users with a higher UID
 get their UID and GID allocated at package installation time and use the
 first ones that are available.  So these vary greatly between systems.

strange I use ldap for my userid/passwdb and when I build a  new
machine, I install a based debian, install my slapd packages which
integrate into pam/nss and then at the beggining I do a uid/gid check to
sync up uid/gid - usually only 1 or 2 changes like sshd = exim

but after that I can install all my other packages like apache and they
check first to see if the userid exist before creating any new ones, so
I have consistant uid/gid across all my machines.

so if the op is copying over his /etc/{passwd,groups,shadow} files and
then starts to install packages that should be fine

by your logic if I purged apache and then reinstalled I would recieve a
new uid/gid !

 
 Sven
 
 

-- 
One of the great things about books is sometimes there are some fantastic 
pictures.

- George W. Bush
01/03/2000


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Alex Samad
On Wed, Sep 16, 2009 at 10:17:26AM -0400, Robert P. J. Day wrote:
 On Wed, 16 Sep 2009, Sjoerd Hardeman wrote:
 
  Kept thinking a bit longer: are the uids and gids of daemon users
  actually determined during install? My experience is that these
  users actually preserve their uid over installations quite well.
 
   nope.  for example, on the old system, openldap account has a UID of
 114.  on new system, 105.  numerous other daemon UID differences as
 well.  so a straight copy isn't going to work here.  this just gets
 trickier and trickier.

if you have coped over the passwd/group/shadow file they should align
up, package should check to see if the uid/gid exists before creating
new ones.  the only time this doesn't happen is when you do a new
install and the first packages are installed - you can't get the
passwd/group files over before then (maybe that should be a bugreport!)

any way I use this little script to check and modify GID - it creates a
bunch of shell commands to execute

changeGID.sh
#!/bin/dash

if test -z $1 || test -z $2
then
echo usage:
echo \tchangeGID.sh oldGroupId newGroupId
exit 1
fi

OLDGID=$1
NEWGID=$2
WRKFILE=${WRKFILE:-'/tmp/wrkfile'}
GIDN=$(cut -d : -f -3 /etc/group | grep -e :${OLDGID}\$ | cut -d : -f -1)


if test -z $GIDN
then
echo Unable to find groupid for $OLDGID
exit 1
fi


echo Workfile is at $WRKFILE
echo ===

echo About to change gid $OLDGID to $NEWGID
echo ===
echo # made $(date -R) $WRKFILE
echo # Changing $OLDGID to $NEWGID $WRKFILE
echo # Group: $GIDN $WRKFILE
echo  $WRKFILE

echo Update /etc/group
echo # update /etc/group file $WRKFILE
echo 'perl -i.bak-'$GIDN'-'$OLDGID'-'$NEWGID' -pe 
s/^'$GIDN':([^:]*):'$OLDGID':/'$GIDN':\\1:'$NEWGID':/ /etc/group'  $WRKFILE
echo  $WRKFILE

echo Update /etc/passwd
echo # update /etc/passwd file $WRKFILE
echo 'perl -i.bak-'$GIDN'-'$OLDGID'-'$NEWGID' -pe 
s/^([^:]*):([^:]*):([^:]*):'$OLDGID':/\\1:\\2:\\3:'$NEWGID':/ /etc/passwd'  
$WRKFILE
echo  $WRKFILE

echo Finding Files to change
echo # files that need to change owner $WRKFILE
echo # ignores /exports  /home $WRKFILE
find / \( -type d  -iregex ^\(/home\|/exports\|/proc\) -prune  \) -o \( -gid 
$OLDGID -printf chgrp $NEWGID %p\n \)  $WRKFILE
echo  $WRKFILE

echo finished with $WRKFILE

i usually run it like ./changeGID.sh 101 102  /tmp/doit.sh 

then check doit.sh and then run it sh /tmp/doit.sh


here is the uid one

#!/bin/dash

if test -z $1 || test -z $2
then
echo usage:
echo \tchangeUID.sh oldUserId newUserId
exit 1
fi

OLDUID=$1
NEWUID=$2
WRKFILE=${WRKFILE:-'/tmp/wrkfile'}
UIDN=$(cut -d : -f -3 /etc/passwd | grep -e :${OLDUID}\$ | cut -d : -f -1)


if test -z $UIDN
then
echo Unable to find userid for $OLDUID
exit 1
fi


echo Workfile is at $WRKFILE
echo ===

echo About to change uid $OLDUID to $NEWUID
echo ===
echo # made $(date -R) $WRKFILE
echo # Changing $OLDUID to $NEWUID $WRKFILE
echo # User: $UIDN $WRKFILE
echo  $WRKFILE

echo Update /etc/passwd
echo # update /etc/passwd file $WRKFILE
echo 'perl -i.bak-'$UIDN'-'$OLDUID'-'$NEWUID' -pe 
s/^'$UIDN':([^:]*):'$OLDUID':/'$UIDN':\\1:'$NEWUID':/ /etc/passwd'  $WRKFILE
echo  $WRKFILE

echo Finding Files to change
echo # files that need to change owner $WRKFILE
echo # ignores /exports  /home $WRKFILE
find / \( -type d  -iregex ^\(/home\|/exports\|/proc\) -prune  \) -o \( -uid 
$OLDUID -printf chown $NEWUID %p\n \)  $WRKFILE
echo  $WRKFILE

echo finished with $WRKFILE


similar principle

Alex

 
 rday

-- 
Linux, the way to get rid of boot viruses
-- MaDsen Wikholm, mwikh...@at8.abo.fi


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Emanoil Kotsev
Alex Samad wrote:

 On Wed, Sep 16, 2009 at 10:17:26AM -0400, Robert P. J. Day wrote:
 On Wed, 16 Sep 2009, Sjoerd Hardeman wrote:
 
  Kept thinking a bit longer: are the uids and gids of daemon users
  actually determined during install? My experience is that these
  users actually preserve their uid over installations quite well.
 
   nope.  for example, on the old system, openldap account has a UID of
 114.  on new system, 105.  numerous other daemon UID differences as
 well.  so a straight copy isn't going to work here.  this just gets
 trickier and trickier.
 
 if you have coped over the passwd/group/shadow file they should align
 up, package should check to see if the uid/gid exists before creating
 new ones.  the only time this doesn't happen is when you do a new
 install and the first packages are installed - you can't get the
 passwd/group files over before then (maybe that should be a bugreport!)
 
 any way I use this little script to check and modify GID - it creates a
 bunch of shell commands to execute
 

OK, thanks for confirming, so I could cheat the installer by copying over
the passwd and group files after partitioning is done and go on with the
system install. Then apply set-selection and after this migrate the config
and data files from the old system. Correct?

this looks to be a compact way to do the job. The only thing that should be
migrated in this case are databases, Correct?

How can the above be applied to debootstrap - it's my favorite one for
installing new systems. I'm testing this now and will report if it works.
The start was promissing

regards

regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Emanoil Kotsev
Emanoil Kotsev wrote:

 
 OK, thanks for confirming, so I could cheat the installer by copying over
 the passwd and group files after partitioning is done and go on with the
 system install. Then apply set-selection and after this migrate the config
 and data files from the old system. Correct?
 
 this looks to be a compact way to do the job. The only thing that should
 be migrated in this case are databases, Correct?
 
 How can the above be applied to debootstrap - it's my favorite one for
 installing new systems. I'm testing this now and will report if it works.
 The start was promissing
 

It's working!

shell :/tmp# mkdir testdeb
shell :/tmp# mkdir testdeb/etc
shell :/tmp# cp /etc/passwd* testdeb/etc/
shell :/tmp# cp /etc/group* testdeb/etc/
shell :/tmp# debootstrap --verbose lenny testdeb/
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://ftp.us.debian.org/debian...
I: Retrieving adduser
I: Validating adduser
I: Retrieving apt
I: Validating apt
...
I: Retrieving zlib1g
I: Validating zlib1g
I: Extracting base-files...
I: Extracting base-passwd...
I: Extracting bash...
...
I: Extracting zlib1g...
I: Installing core packages...
I: Unpacking required packages...
I: Unpacking base-files...
I: Unpacking base-passwd...
I: Unpacking bash...
I: Base system installed successfully.
shell :/tmp# chroot testdeb/ sh -
shell :/# apt-get install exim4
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  bsd-mailx exim4-base exim4-config exim4-daemon-light liblockfile1 libpcre3
mailx perl perl-modules psmisc
Suggested packages:
  mail-reader eximon4 exim4-doc-html exim4-doc-info gnutls-bin openssl file
libmail-spf-query-perl swaks perl-doc
  libterm-readline-gnu-perl libterm-readline-perl-perl
The following NEW packages will be installed:
  bsd-mailx exim4 exim4-base exim4-config exim4-daemon-light liblockfile1
libpcre3 mailx perl perl-modules psmisc
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 9993kB of archives.
After this operation, 33.8MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp.us.debian.org lenny/main liblockfile1 1.08-3 [18.6kB]
Get:2 http://ftp.us.debian.org lenny/main exim4-config 4.69-9 [350kB]
Get:3 http://ftp.us.debian.org lenny/main exim4-base 4.69-9 [987kB]
Get:4 http://ftp.us.debian.org lenny/main libpcre3 7.6-2.1 [211kB]
Get:5 http://ftp.us.debian.org lenny/main exim4-daemon-light 4.69-9 [422kB]
Get:6 http://ftp.us.debian.org lenny/main exim4 4.69-9 [7478B]
Get:7 http://ftp.us.debian.org lenny/main bsd-mailx 8.1.2-0.20071201cvs-3
[157kB]
Get:8 http://ftp.us.debian.org lenny/main perl-modules 5.10.0-19lenny2
[3198kB]
Get:9 http://ftp.us.debian.org lenny/main perl 5.10.0-19lenny2 [4549kB]
Get:10 http://ftp.us.debian.org lenny/main psmisc 22.6-1 [84.7kB]
Get:11 http://ftp.us.debian.org lenny/main mailx 1:20071201-3 [8260B]
Fetched 9993kB in 32s (311kB/s)
perl: warning: Setting locale failed.
...
Preconfiguring packages ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Selecting previously deselected package liblockfile1.
(Reading database ... 7941 files and directories currently installed.)
Unpacking liblockfile1 (from .../liblockfile1_1.08-3_i386.deb) ...
Selecting previously deselected package exim4-config.
Unpacking exim4-config (from .../exim4-config_4.69-9_all.deb) ...
...
Setting up liblockfile1 (1.08-3) ...
Setting up exim4-config (4.69-9) ...
...
shell :/# cat /etc/passwd | grep exim4
Debian-exim:x:102:108::/var/spool/exim4:/bin/false

shell :/# exit

The Exim ID is the same as expected, so migration of exim related files will
cause no pain. The same for common user files.

What about database files. Is there something related to 64bit (I could
expect) that would suggest export / import or backup / restore?

regards





-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Jochen Schulz
Alex Samad:
 On Wed, Sep 16, 2009 at 04:11:17PM +0200, Sven Joachim wrote:
 
 This is only true for users with a UID  100, as these are defined and
 maintained by the base-passwd package.  System users with a higher UID
 get their UID and GID allocated at package installation time and use the
 first ones that are available.  So these vary greatly between systems.
-- snip
 by your logic if I purged apache and then reinstalled I would recieve a
 new uid/gid !

No, he doesn't say that. UIDs are determined on first install, if the
usernames do not exist already. If they do, they are kept unchanged.
And purging a package doesn't remove the username-UID mappings, they
are always kept intact (since apt cannot tell for sure whether you still
have any files left with the respective owner).

J.
-- 
I think the environment will be okay.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Jochen Schulz
Emanoil Kotsev:
 Andrei Popescu wrote:
 
 Yes, groups created by a package are not removed, not even on purge (I
 still have the 'Debian-exim' user and group, though I purged it and
 replaced it with postfix). If that same package is reinstalled it will
 reuse the user:group, this is why it should work.
 
 I think it depends on the packager decision and effort - some packages
 remove the user some not.

No, these kinds of things are described in the Debian Policy. Any
(severe) deviation from it is a serious bug.

J.
-- 
If you do not move for long enough, you might see a rat.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature


Re: migrating my lenny install from 32-bit to 64-bit?

2009-09-16 Thread Jochen Schulz
Emanoil Kotsev:
 
 You are right, that I'm not targeting the same approach. Migration of data
 and services involves too much manual work. However I was thinking that
 after replacing the package sources in source.list you could force
 reinstall if every single package that has the status installed, pulling
 from amd64 should bring the packages to the 64 code. For sure there would
 be also some manual work to do, but less.
 
 Do you think it's possible?

Don't you read the replies to your mails? There is no way to tell apt
which architecture to fetch packages for. Not in sources.list nor
anywhere else.

J.
-- 
If I am asked 'How are you' more than a million times in my life I
promise to explode.
[Agree]   [Disagree]
 http://www.slowlydownward.com/NODATA/data_enter2.html


signature.asc
Description: Digital signature