Announcement

Collapse
No announcement yet.

Backup ONLY user space and settings

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [KDE] Backup ONLY user space and settings

    Hi,

    I'm using
    Code:
    Operating System: Kubuntu 21.04
    KDE Plasma Version: 5.21.4
    KDE Frameworks Version: 5.80.0
    Qt Version: 5.15.2
    Kernel Version: 5.8.0-25-generic
    OS Type: 64-bit
    Graphics Platform: X11
    Processors: 4 ? Intel? Core? i7-5500U CPU @ 2.40GHz
    Memory: 7.7 GiB of RAM
    Graphics Processor: Mesa Intel? HD Graphics 5500
    Single user on my HP Spectre-x360 4003dx laptop
    Following this thread https://askubuntu.com/questions/1345...date-to-ubuntu I want backup ONLY all my:
    1. settings & configurations
    2. user data (all folders under ~/home/USER_NAME/)
    3. user apps (all apps installed by me)

    so I can fresh install Kubuntu v21.04 and then restore/integrate it with these backup. Is it possible?

    Currently I can see that using kcmshell5 (KBackups) I can only create a single version backup scheme (I can choose which folders to include) that will override the entire fresh installation.


    Thanks

    #2
    If it were only numbers 1 and 2, the answer would be easy - rsync or an rsync-based GUI app.

    Number 3 presents a possibly different situation in that "it depends". What do you use to install the apps? That may dictate where they end up, such as /opt, or just mixed in with others in, say, /usr/bin or /usr/sbin. I have a spiral bound, physical notebook that I refer to when I do a fresh install. If you don't have many such apps, a note in such a notebook and a few simple sudo apt install <file> inputs later and you're done.

    Without knowing the install vehicle(s) for the apps, it would be difficult to say, but rsync could still work.
    The next brick house on the left
    Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



    Comment


      #3
      Backing up applications is quite difficult, and probably not worth the effort - you have to include not only the binaries, but also any dependencies it uses - other programs and libraries, etc.
      Snap packages are stored in a central location, but not in the user's home, and not sure if simply restoring the actual files also automatically 'installs' them
      Flatpaks are similar, though they can be stored in $HOME if expressly installed using the '--user' option.
      .
      Actually for Snap packages: https://snapcraft.io/docs/snapshots


      Now, one can create a list of all installed native deb packages, and restore that list, but this will only work when installing the exact same *buntu release and other addon repos.
      Muon Package Manager and Synaptic have an option somewhere to create and restore such a list.







      As a side note, the Kup backup program does not show the "versioned backup' option because the command line tool it uses, Bup, was removed from Debian (and thus Ubuntu some releases back) as it used the now deprecated Python version 2.
      There is now a Python 3 version, but I don't see this in the upcoming 21.10 release so hopefully it will be returning to Ubuntu, but no idea when.
      KDE Neon builds a package for it now, which I accidentally noticed about a month back. The Kup backup was one of my backup strategies in the 18.04 era, now get to use it again.

      Comment


        #4
        Some time ago I found some instructions on how to ensure that ALL your current apps are reinstalled after an upgrade or clean install. Quite frankly, while I have the instructions for Installed Apps, I neither remember where I got them, nor have I actually used them

        However, here they are (note the location quoted below is simply where I keep the instructions, and is not a requirement):
        Run these instruction as "sudo", probably in the ~/Document/Memos/ directory.

        So open a terminal and give in the following command:
        Code:

        sudo dpkg --get-selections > installed-software.txt

        By doing so, you will get list of installed packages in the HOME directory, with the name "installed-software.txt". Backup this file to an external hard disk, to another computer, etc. It is this file you neeed to use at another computer or at the same one after a fresh install of the same distro and version.

        After the fresh install, copy the file "installed-software.txt" to the HOME directory of the new configuration. A next step is the installation of the package "dselect": that one will not be installed by default along with a fresh install. For this purpose, open a terminal and give in the following:
        Code:

        sudo apt-get install dselect

        For getting your favourite software after the fresh install, also use a terminal, with the following command:

        Code:

        sudo dpkg --set-selections < installed-software.txt

        followed by

        Code:

        sudo dselect

        As I said before, you can do so with a view to installing the same packages after a fresh install of the same distro and version: either at the same computer or at another one. !!! If you want to create a similar configuration after an upgrade, act as follows:

        - first upgrade;
        - than carry out the instructions summarised here.

        Why: during each upgrade, several packages will be obsolete, added, removed, etc.
        The next brick house on the left
        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



        Comment


          #5
          This is what Muon and Synaptic are doing, with their package list backup/restore feature. I don't use either and don't have them installed to check the specific location in their respective menus.

          The problem with doing this after an upgrade/fresh install of a new release is that there are more than a few things that will have changed between releases that there will be some errors due to name changes from old bits removed from the archive and/or replaced by things with different names.Granted, it is a minor but tedious task to remove those now-nonexistent items from the text file.

          Comment


            #6
            I agree, it's probably problematic. In most cases, the instructions SHOULD bring in the most current version of the named package, and all its dependencies. The "should", I guess, is why I've never used it.

            When I do a fresh LTS install, I have my notebook in which I've noted what is in my starter menu. I bring in those packages that still exist, post-install, and press on. Typically, I leave my home in place as a part of the clean install, so installing new versions also set up new configs.
            The next brick house on the left
            Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



            Comment

            Working...
            X