Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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) ?
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.
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?
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]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.