Upgrading to Ubuntu 20, *how* to back up?

Bo Berglund bo.berglund at gmail.com
Tue Apr 28 13:20:45 UTC 2020


On Mon, 27 Apr 2020 09:44:36 +0100, David Fletcher
<dave at thefletchers.net> wrote:

>here is the very short script that I have used
>on my desktop computers ever since I started using Linux of various
>flavours....
>
>#! /bin/bash
>
># Local etc directory
>rsync -av --delete /etc/ /home/dave/backups/copyoflocalslashetc/
>
>aptitude search '~i !~M' | tr -s ' ' | cut -f 2 -d ' ' >
>/home/dave/backups/AppsInstalledList.txt
>
>tar cvpPzf /root/home`date +%Y%m%d%H%M`.tar.gz --exclude-
>from=/home/BackupThisPCExcludes /home/*
>
>Most of my irreplaceable files are now stored on a separate server so I
>also have a script on the same desktop computer that runs with cron
>every hour to rsync vital things like the /etc/ and /home/ directories
>on the server, to the backups directory in the script above, so that
>everything important is captured into the final tar file.

Interesting, especially the way to extract what was installed via apt.
However when I try this on the command line on Ubuntu 18.04 I get a
strange result (without sending the output to a file):

~$ aptitude search '~i !~M' | tr -s ' ' | cut -f 2 -d ' '

Command 'aptitude' not found, but can be installed with:
sudo apt install aptitude

So I changed aptitude to apt and got this:

$ apt search '~i !~M' | tr -s ' ' | cut -f 2 -d ' '

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

Sorting...
Text

Seems like I have gotten it all wrong here.
I thought apt was a short form of aptitude....


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list