Re: [bitfolk] apt-clone problem

Top Page
Author: Andy Smith
Date:  
To: users
Subject: Re: [bitfolk] apt-clone problem

Reply to this message
gpg: Signature made Fri May 17 18:47:38 2019 UTC
gpg: using DSA key 2099B64CBF15490B
gpg: Good signature from "Andy Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andrew James Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andy Smith (UKUUG) <andy.smith@ukuug.org>" [unknown]
gpg: aka "Andy Smith (BitFolk Ltd.) <andy@bitfolk.com>" [unknown]
gpg: aka "Andy Smith (Linux User Groups UK) <andy@lug.org.uk>" [unknown]
gpg: aka "Andy Smith (Cernio Technology Cooperative) <andy.smith@cernio.com>" [unknown]
Hi Ian,

On Fri, May 17, 2019 at 03:21:40PM +0100, Ian Hobson wrote:
> I am trying to clone my bitfolk Ubuntu 18.04 VPS, using apt-clone.
>
> The issue is that the restore overrides /etc/apt/sources.list - so it fails,
> because it could not connect to apt-cacher.lon.bitfolk.com:80.


I've never used apt-clone but I am assuming that it creates an
archive that contains your current /etc/apt/sources.list and some
record of every package you have installed.

If so then I suggest keeping a generic /etc/apt/sources.list that
contains references to deb.debian.org (so will work anywhere), and
make a script which:

1. Backs up /etc/apt/sources.list
2. Copies your generic sources.list over the top of
/etc/apt/sources.list
3. Runs apt-clone
4. Puts your real sources.list back at /etc/apt/sources.list

Personally I have a cron job that runs:

# dpkg --get-selections \* > list_of_packages

And another:

# debconf-get-selections > list_of_settings

This records all packages that are installed and the answers to all
debconf questions (things asked by dpkg during package install) in
case they ever need to be reinstalled on a clean system.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting