LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2016, 10:18 AM   #1
islammanjurul
LQ Newbie
 
Registered: Dec 2015
Posts: 11

Rep: Reputation: Disabled
Updating ubuntu temporarily for testing


Hi,

Need a little help and suggestion. I want to upgrade/update some ubuntu servers for testing purposes. One of the first tasks will be setting up 15+ ubuntu web app servers for security updates (think apt-get) in a manner that allows for testing first. Please briefly describe how you would accomplish this task (of keeping all servers up to date).

After testing the update, if all looks good, I want to keep the change otherwise want to revert back to old packages.

How can I accomplish this? If it is only my virtual environment, can I do that having snapshots (VMware) then doing the upgrade?

Is there any way to do the same without snapshots (like on cloud) ?
 
Old 01-27-2016, 10:57 AM   #2
fang0654
Member
 
Registered: Oct 2003
Location: New York, NY
Distribution: Ubuntu
Posts: 110

Rep: Reputation: 28
Your best bet would be snapshots in a virtual environment. You do the upgrades, do the testing, and if everything checks out, you delete the snapshot. If not, you roll back.

If snapshots aren't an options, and you are only doing minor updates (ie security updates), then you should be able to roll back if you need to as long as you still have the old package versions cached. You'd have to go into /var/cache/apt/archives and manually dpkg -i "oldpackage" to roll back.
 
1 members found this post helpful.
Old 01-27-2016, 11:53 AM   #3
islammanjurul
LQ Newbie
 
Registered: Dec 2015
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fang0654 View Post
Your best bet would be snapshots in a virtual environment. You do the upgrades, do the testing, and if everything checks out, you delete the snapshot. If not, you roll back.

If snapshots aren't an options, and you are only doing minor updates (ie security updates), then you should be able to roll back if you need to as long as you still have the old package versions cached. You'd have to go into /var/cache/apt/archives and manually dpkg -i "oldpackage" to roll back.
That's sound a great option, but can you please elaborate a little more on how to manually dpkg -i "oldpackage", link to any guide to complete this process?

Can I follow this guide given on below link
http://askubuntu.com/questions/59443...sed-repository
 
Old 01-27-2016, 12:18 PM   #4
fang0654
Member
 
Registered: Oct 2003
Location: New York, NY
Distribution: Ubuntu
Posts: 110

Rep: Reputation: 28
That guide is more for if you upgrade the entire distribution, rolling it back. Here's a pretty easy way to do things on a package by package basis:

Say you are testing libxml2:

Quote:
user@server:~$ apt-cache show libxml2 | grep Version
Version: 2.9.1+dfsg1-3ubuntu4.7
Version: 2.9.1+dfsg1-3ubuntu4
The 2.9.1+dfsg1-3ubuntu4 is the one installed now, and 2.9.1+dfsg1-3ubuntu4.7 is the updated version.

Quote:
user@server:~$ sudo apt-get install libxml2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
libxml2
1 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
<...etc...>
If you were unhappy with that package, and wanted to roll it back (found an easier way), you can just use apt-get install to do it like so:

Quote:
user@server:~$ sudo apt-get install libxml2=2.9.1+dfsg1-3ubuntu4
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
libxml2
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 26 not upgraded.
Need to get 0 B/571 kB of archives.
After this operation, 5,120 B disk space will be freed.
Do you want to continue? [Y/n]
Again though, much easier to just use snapshots!
 
1 members found this post helpful.
Old 01-27-2016, 12:24 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
check also in /var/cache/apt/archives/
Until you issue an
Code:
apt-get clean
or a dist-upgrade, every .deb ever installed should be stored there.

Code:
sudo dpkg -i /var/cache/apt/archives/some.deb
https://help.ubuntu.com/search.html?...dpkg&sa=Search
 
1 members found this post helpful.
  


Reply

Tags
apt-get update, testing, ubuntu 14.04, updates


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu 12.04: Updating via ssh. Dropped connection. Updating locked. How to continue robsbots Linux - General 10 10-02-2014 08:51 PM
Ubuntu 12.10 - Setting a hotkey to temporarily disable snapping; Workspace problems theif519 Linux - Newbie 1 03-06-2013 01:49 PM
[SOLVED] Debian Testing. Error after updating xserver. BadRequest at glxinfo. Mortuus Linux - Desktop 7 10-19-2010 06:25 PM
How do I temporarily but completely uninstall Ubuntu 10.4? NYWEISS Linux - Newbie 4 05-24-2010 01:37 PM
[SOLVED] Major problems on boot and sound after updating to 2.6.30 (testing branch) jim_p Debian 5 09-22-2009 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration