<html class="apple-mail-supports-explicit-dark-mode"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Most providers let you boot your VPS in a \u201crescue\u201d mode that is usually just an immutable Linux instance. I did this recently to migrate my openbsd vps on OVH. Boot rescue, then dd the drive, piping over SSH to somewhere you can store it. Reverse the process to install it on your new system. No need for tricky rsync paths because the drive isn't mounted. Worked great.<br id="lineBreakAtBeginningOfSignature"><div dir="ltr">-<div>Jason</div></div><div dir="ltr"><br><blockquote type="cite">On Dec 6, 2025, at 2:59\u202fPM, Khalid Baheyeldin <kb@2bits.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">\ufeff<div dir="ltr"><div><div style="font-size:small" class="gmail_default">When one is upgrading a Linux machine at home or work, whether it is a desktop or a server, the procedure is basically a solved problem.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">If the disk on the old machine is up to spec, then one can just unplug it from the old machine, and plug it in the new one, and things should continue to work as expected. </div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">If the new disk is faster, then one can still copy the old disk to it, either by plugging the old one in the new machine, or over the LAN connection (which I detailed in the article: <a href="https://baheyeldin.com/linux/how-to-migrate-old-linux-computer-disk-to-new-computer.html">How To Migrate Old Linux Computer Disk To A New Computer</a>).</div><br clear="all"></div><div style="font-size:small" class="gmail_default">But, if your server is a VPS image, things are not as straightforward ...</div><div style="font-size:small" class="gmail_default">This is in preparation of moving one VPS from Linode to the cheaper OVH, per the recent discussion thread ...</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Let us go with the assumption that both VPS are the same distro and version (Ubuntu Server 24.04 LTS in this case), to simplify things. </div><div style="font-size:small" class="gmail_default">I want all the packages, and their current configurations, as well as my own directories, to be moved over.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Some people have written guides (e.g. <a href="https://blog.racknerd.com/how-to-migrate-from-old-vps-to-new-vps-using-rsync-migrating-a-linux-vps/#Creating_the_Exclusion_List">this one</a>) on how to do that, using rsync and an exclude list. </div><div style="font-size:small" class="gmail_default">But I find that the exclude list is too long, and includes things that should not be excluded (like /etc/default, /boot, /var/log, ...etc.)</div><div style="font-size:small" class="gmail_default">If I want everything to end up being the same on the new VPS, then everything should be moved over, excluding special directories (/proc, /sys, ...) and the network configuration. </div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">As an example, /var/cache/apt should be included (but /var/cache/apt/archives/* can be excluded)</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Should /lib/modules, and /lib64/modules be excluded?</div><div style="font-size:small" class="gmail_default">On my Linode VPS, it contains many modules with "linode" in the name. </div><div style="font-size:small" class="gmail_default">So it has some provider specific stuff, and for that reason, it should be excluded, I think. </div><div><br></div><div><div style="font-size:small" class="gmail_default">I came up with this much shorter list:</div><div style="font-size:small" class="gmail_default"><br></div><span style="font-family:monospace">/etc/fstab<br>/etc/systemd/network/*<br>/etc/network/*<br>/etc/netplan/*<br>/etc/networks<br>/etc/netconfig<br>/etc/resolv.conf<br>/etc/hostname<br>/etc/hosts<br>/etc/machine-id<br>/var/lib/dbus/machine-id<br>/proc/*<br>/tmp/*<br>/sys/*<br>/dev/*<br>/mnt/*<br>/run/*<br>/var/run/*<br>/var/lock/*<br>/lost+found<br>/swapfile<br>/swap.img<br>/var/crash/*<br>/var/cache/apt/archives/*<br>/lib/modules/*<br>/lib/firmware/*<br>/lib64/modules/*<br>/lib64/firmware/*</span></div><div><br></div><div><div style="font-size:small" class="gmail_default">Thoughts? Comments?</div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Khalid M. Baheyeldin<br><br></div></div>
<span>_______________________________________________</span><br><span>kwlug-disc mailing list</span><br><span>To unsubscribe, send an email to kwlug-disc-leave@kwlug.org</span><br><span>with the subject "unsubscribe", or email</span><br><span>kwlug-disc-owner@kwlug.org to contact a human being.</span><br></div></blockquote></body></html>