How to properly replicate of all distro packages + python packages from an ubuntu server on AWS to an ubuntu server on DO
I’m trying to migrate all the distro and python packages I have on an AWS ubuntu server , to my newly created DO server
Please find below my DO and AWS Distro’s release
- AWS : Ubuntu 14.04.5 LTS
- DO : Ubuntu 16.04.1 LTS
I listed all the distro and python packages I have from my AWS server, with the following commands
sudo dpkg --get-selections > dpkglist.txt pip freeze > freeze.lst
Then on my DO server, I did the following
dpkg --set-selections < dpkglist.txt pip install -U -r freeze.lst #to restore the python packages pip3 install -U -r freeze.lst #to restore the python packages
Yet, there were many errors during this reinstall.
I had to uninstall one package
ppp for the dpkg to have everything working properly for the dependances.
pip , I had to text edit the
freeze.lst , manually removing some of the packages to have everything sorted.
The experience was messy, confusing and definitely not clean, IMO.
Questions are the following:
- What should I do to make a clean slate packages , distro and python, import?
- Is there an easy way to do such imports without any hassle e.g with (a) tool(s)?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×