View previous topic :: View next topic |
Author |
Message |
Gherry75 n00b
Joined: 26 Feb 2014 Posts: 2
|
Posted: Wed Feb 26, 2014 10:19 am Post subject: Old server and updates |
|
|
Hello everyone,
at work there's a new client who have a gentoo server which, as far as I can see, hasn't been updated in 2-3 years, maybe a bit more.
The problem is that the server is running, it cannot be taken offline (or at least that's the last resort) and I cannot install anything, since the profile is old. Moreover one of the disks (it's a software raid6) is dying, keep showing on and off at checks, so I have to do something ASAP.
(I tried installing smartmontools, for example, but console output was:
!!! Your current profile is deprecated and not supported anymore.
!!! Use eselect profile to update your profile.
!!! Please upgrade to the following profile if possible:
default/linux/x86/13.0)
Reading a lot on internet and especially here, it seems to me the easier thing to do is to reinstall everything from scratch, rather than attempting to update a whole system with its tools and configuration, while hoping everything works fine
That said I think I'll backup everything first, then start installing an updated gentoo (and I'll keep it updated).
Question is: how to backup the data?
I'd like to backup everything, but I cannot install any software, so I'm kinda desperate.
Is there a way to backup this system you can think of without taking it offline?
I can only think of #dd but I hope there's some other and maybe easier and faster way.
Any help is greatly appreciated,
Thanks in advance |
|
Back to top |
|
|
moisespedro n00b
Joined: 01 Jan 2014 Posts: 71
|
Posted: Wed Feb 26, 2014 12:24 pm Post subject: |
|
|
Maybe rsync? |
|
Back to top |
|
|
mvaterlaus Apprentice
Joined: 01 Oct 2010 Posts: 234 Location: Switzerland
|
Posted: Wed Feb 26, 2014 1:56 pm Post subject: |
|
|
have you tried updating portage first? maybe you have to try with the following options:
Code: | emerge -av --deep --update --newuse portage |
after that, you can select the new profile and then do a world update.
[edit]
for backups you could also remount all filesystems with ro permissions and then create a tar file over the whole installation. But be aware that mounting some filesystems ro will lead to improper functioning of some daemons.
[/edit] _________________ For calming down your eyes or clearing your mind: www.patrickwehli.ch |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Wed Feb 26, 2014 2:42 pm Post subject: |
|
|
I've tried updating 6-month old and 12-month old Gentoo installations, and it's really
not a good idea. At 3 years you are definitely in reinstall territory, however you
achieve it.
I tend to update by building a root filesystem on a spare partition and then, once
the new setup is running correctly, I copy it over to my working partition. In your
case you'd have to build the new install on a spare _machine_, and then shutdown
and copy across. But anyway, there's a (brief) shutdown somewhere in your future.
Good luck - Will |
|
Back to top |
|
|
mvaterlaus Apprentice
Joined: 01 Oct 2010 Posts: 234 Location: Switzerland
|
Posted: Wed Feb 26, 2014 3:41 pm Post subject: |
|
|
cwr wrote: |
I've tried updating 6-month old and 12-month old Gentoo installations, and it's really
not a good idea. At 3 years you are definitely in reinstall territory, however you
achieve it.
|
well, I must admit, that he is right about the installation. I once updated my notebook after aproximately 2,5 years without updating. I made it, but it was a real pain. I had about 4 workdays to get my notebook to a current software state. _________________ For calming down your eyes or clearing your mind: www.patrickwehli.ch |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Wed Feb 26, 2014 5:43 pm Post subject: |
|
|
Gherry75 While it is possible to update the system, it will be a royal pain to accomplish if you are not an experienced gentoo user. While gentoo is a rolling distro, it can only be relatively smooth for so long before there are enough changes that will make it difficult to update.
Your best course of action is to create a new system as was suggested and swap it out. By so doing, downtime will be at a minimum, and you will be able to test that the new system is running correctly before the shutdown, updating the data in the new system and restart.
For future reference, it is best to not let a gentoo system go more than 3 months without updating. Longer than that becomes more troublesome depending on what has changed and incompatibilities between newer apps and older dependencies. It also takes more skill and maintenance time to get it updated. Many sysadmins have gentoo based servers go 1 yr between updates aside from security fix updates. It just depends on what the server is running and what incompatibilities have been introduced with newer software. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21498
|
Posted: Thu Feb 27, 2014 12:05 am Post subject: |
|
|
If a drive is showing failure and you have the hardware to spare, you should either swap out the drive or create a clone of the system, outdated packages and all, so that you have something you can run if the drive dies before you finish building the new machine. For cloning like this, it is probably sufficient to restore the most recent system backup onto a new filesystem and adjust configuration from there. You do have existing routine backups already, right? Your post sounds like there are no archives, which is its own recipe for trouble. I second the suggestion to use either rsync or tar, as you prefer. As a prior poster hinted, if you do this while the system is up, some daemons may have their data files in an inconsistent state. This is most often a problem with database servers, but can affect other things that routinely modify local state in response to network requests. |
|
Back to top |
|
|
Aiken Apprentice
Joined: 22 Jan 2003 Posts: 239 Location: Toowoomba/Australia
|
Posted: Thu Feb 27, 2014 2:12 am Post subject: |
|
|
Last time I updated a system that had not been updated for 1 year (364 days) it took 14 hours of a combination of compile time + time spent at the keyboard sorting out problems. Checking with ROOT=/some/dir emerge -pv blah blah | genlop -p showed I could have built a new image for it in 2 1/2 hours. Add time for setting up grub and a new kernel could have had the machine running with a new image in 3 hours.
After that incident I am wary of upgrading if it has been that long. _________________ Beware the grue. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|