Best approach to backup before upgrade from 21 to 23

Forum › Forums › New users › New Users and General Questions › Best approach to backup before upgrade from 21 to 23

  • This topic has 23 replies, 7 voices, and was last updated Sep 17-8:12 pm by BobC.
Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #185496
    stevesr0
    Member

      I am planning to upgrade my antiX-21 to antiX-23. I plan on following the thread started by anticapitalista (antiX-21/22 to antiX-23).

      It is advised that before attempting to upgrade from one version of antiX to the next one, “backup” is essential.

      As this system doesn’t have critical files, my primary concern is the ability to restore it to a working state, if the upgrade makes it not usable. However, I have usb drives with more than enough capacity to accept all my Linux files.

      As a permanent noobie, I am seeking advice about the simplest, safe approach to backup and recovery, whether copy and paste, cloning or iso file (a la dd).

      Also about what beyond home and data should be backed up. Is it worthwhile to backup all all of root or just select parts (like rc.local)?

      I plan to do the backup to and recovery (if necessary) from a usb drive. As suggested, I would like to use a specific, step-by-step method which produces a live version of my system (snapshot?) that I could make sure worked, prior to initiating the upgrade.

      I do believe other noobies might benefit from advice on this point.

      If this is provided by another thread on the forum, a reference to the thread would be appreciated.

      Thanks in advance.

      • This topic was modified 1 year ago by stevesr0.
      #185501
      Brian Masinick
      Moderator

        If you do am ISO Snapshot, you can use it as a bootable image , a backup or a device from which to copy select files, and for me personally it’s my preferred method, simply because it’s always a way to have a runnable system.

        I’ve used tar copying as a method in the past but ISO images are what I use now.

        You mentioned backup and recovery; that’s another good method.

        --
        Brian Masinick
        Alternate "Search B":
        This search page

        #185506
        PDP-8
        Member

          I agree with Brian about using the iso-snapshot feature. That’s a crown-jewel utility of antiX. Never fails!

          Perhaps when making the iso-snapshot, instead of using the personal feature, use the distribute-to-others option instead, like having your very own respin.

          #185524
          sybok
          Member

            Apart from ‘iso-snapshot’, I’d go for:
            1) List manually installed packages – I believe that there was a dedicated tool|script to do that (discussed elsewhere on the forum)
            2) Directories and files: A) home ~/.* and B) system-wide, content of /etc/

            Few comments regarding 2.A):
            Not necessary to store all the stuff!
            ‘.cache/’ is a good candidate for a bloat.
            ‘~/.local/lib/python3.*/site-packages/’ could be simply replaced with content file ‘pip list > ~/.pip_installed_$(date +%Y-%m-%d).txt’

            In case of reinstalls, I suggest to set up multiple partitions for your system: ‘/’ [root], ‘/home/’ [home] and ‘/data/’ [data-partition, it can be linked to a directory to your home such as ‘~/Documents/’] – upgrade affects only ‘/’.

            #185543
            stevesr0
            Member

              Thanks to all for their comments.

              So,

              General agreement that using the antiX iso-snapshot tool to make a backup is best/easiest. Wasn’t aware of its range of functions (backup, selective file retrieval and booting).

              Re: capturing a list of all “manually” installed packages –
              I assume anything installed via apt is NOT manual (“apt install x” or “apt upgrade x, y, z”). Are packages installed via dpkg also captured in the same way that packages installed via apt are? If so, the only manually installed packages are those built from source, yes? (I will search for the app that lists manually installed packages)

              On the antiX-21 install currently, I have /home, /data and /root in separate partitions (IIRC). Given, that, I need to ensure that I have a backup of /etc, /home and /data, although a “total backup” including /, /home and /data would also be fine, as long as my backup medium has enough space.

              Do I need to still apply the gpg expired fix with an upgrade from antiX-21 to antiX-23 (23.2)?

              This is a dual-boot with (IIRC) some Linux partitions “separated” by Windows partitions. Does that call for special actions to avoid problems?

              #185545
              Brian Masinick
              Moderator

                Another tool that I’ve never personally used, but it available in our wonderful software collection is LuckyBackup.
                I mentioned tar; that’s been a classic backup tool that I use; at one time I had a list of files to ALWAYS backup plus some exclusions; I used to use the list of files to feed into my script that I wrote, utilizing tar; hand-built tools with scripts plus standard tools can ALSO get the job done; there is no one single way you must use. So all of the suggestions here are legitimate; in your case I’d try a combination of them. For a FULL BACKUP I can’t imagine anything better than ISO Snapshot; you can immediately run from it, but it’s big and comprehensive.

                When I worked in a system admin group and also in an operating systems group, we had a variety of tools.
                We’d DEFINITELY do a full system’s backup regularly, but not necessarily daily.
                We’d do incremental backups, that found files that were either created or altered since the previous backup, and it’d be done on a daily basis.
                Then there are various methods to handle specific backup and recovery approaches. I’d say we’ve covered a reasonable number of them already in this topic, but feel free to explore, learn, and experiment to arrive at a combination that works best for your specific needs.

                --
                Brian Masinick
                Alternate "Search B":
                This search page

                #185550
                Robin
                Member

                  I assume anything installed via apt is NOT manual (“apt install x” or “apt upgrade x, y, z”). Are packages installed via dpkg also captured in the same way that packages installed via apt are? If so, the only manually installed packages are those built from source, yes? (I will search for the app that lists manually installed

                  Some considerations.

                  This shows all packages installed manually in apt by the $ sudo apt-get install command. I guess, that dpkg installed packages are not included in the output.
                  $ apt-mark showmanual

                  And the following listing contains all originally installed packages in the ISO from which your system has been built, unfortunately without any hint whether manually or automatically.
                  $ cat '/usr/share/antiX/installed-packages.txt'

                  But you can check, which of the packages originally installed are right now marked as manually installed on your system, simply by running something like

                  $ while read line; do pack=$(cut -d' ' -f1 <<<"$line"); apt-mark showmanual "$pack"; done <'/usr/share/antiX/installed-packages.txt'

                  The packages returned were installed manually in the ISO most likely already, unless you have changed the status later on (e.g. by manually installing something which originally was installed automatically as a dependency.)

                  You can save the output of the latter with the output of apt-mark showmanual to files, e.g. by piping, and then diff these files, which will return all packages you have added manually on your own. Then you have a listing, which packages you need to install on your new system to have the same programs available as before. For this, replace \n by blank, e.g. by
                  $ tr '\n' ' '

                  Example:
                  $ while read line; do pack=$(cut -d' ' -f1 <<<"$line"); apt-mark showmanual "$pack" | tr '\n' ' '; done <'/usr/share/antiX/installed-packages.txt'

                  and prepend the resulting string with
                  $ sudo apt apt-get install

                  Windows is like a submarine. Open a window and serious problems will start.

                  #185552
                  sybok
                  Member

                    I assume anything installed via apt is NOT manual (“apt install x” or “apt upgrade x, y, z”).

                    My understanding is different – your 1st command indicates user’s manual action installing ‘x’ separately, i.e. not pulled in as a dependency.

                    #185558
                    Brian Masinick
                    Moderator

                      Do I need to still apply the gpg expired fix with an upgrade from antiX-21 to antiX-23 (23.2)?

                      Yes

                      --
                      Brian Masinick
                      Alternate "Search B":
                      This search page

                      #185559
                      Brian Masinick
                      Moderator

                        Do I need to still apply the gpg expired fix with an upgrade from antiX-21 to antiX-23 (23.2)?

                        Yes

                        Unless it’s been previously done as stated at the top of the website.

                        --
                        Brian Masinick
                        Alternate "Search B":
                        This search page

                        #185575
                        BobC
                        Moderator

                          For full backup and restore, ISO snapshot and Live USB Maker are the way.

                          But that doesn’t get you upgraded with all the packages you added. No matter what method you use, backing up first and then doing a “cleanup” to remove any packages you added that you no longer use so they don’t get installed on your new system and clutter it up, too is highly recommended. I see Robin provided code for additional packages. IIRC others also provided ways to migrate. Not that my solution is better than others, but it exists, has been used a number of times, and is worth looking at.

                          Mine was a couple scripts to handle migration between different antiX versions (best used with one architecture) called packagecomp. I’ve been using it since 2019. You run one script on your modified system, and the other on your newly installed antiX. It compares the packages, makes lists of differences, pops them up to edit, and then you process the lists. It isn’t perfect, but got about 99%, and I manually edited the package lists to add or remove the ones that apt didn’t allow.

                          BTW, It has trouble if you try to switch architecture because it won’t realize that is the reason why those packages differ. If nothing else, looking at the scripts might help you understand the needed sequence of events to migrate.

                          http://www.antixforum.com/forums/topic/upgrading-modified-antix-systems-packagecomp-scripts/

                          Here is the link to SEARCH THE FORUM >> http://www.antixforum.com/search-forums

                          #185589
                          stevesr0
                          Member

                            Again, thanks all for the very interesting collections of “tools”.

                            I will need to try these out to feel comfortable, before attempting the upgrade.

                            ** Another question is,

                            What should I keep in mind if I wish to switch to a runit install from the current sysvinit with the upgrade? Is that usually best done as a fresh install after backup? (This particular computer doesn’t have room for just adding a fresh install in new partitions.)

                            #185595
                            Brian Masinick
                            Moderator

                              Again, thanks all for the very interesting collections of “tools”.

                              I will need to try these out to feel comfortable, before attempting the upgrade.

                              ** Another question is,

                              What should I keep in mind if I wish to switch to a runit install from the current sysvinit with the upgrade? Is that usually best done as a fresh install after backup? (This particular computer doesn’t have room for just adding a fresh install in new partitions.)

                              Back up any information you wish you retain, then remove/delete the installation you wish you replace OR
                              completely rewrite the partition or disk that you intend to use during your installation.

                              As far as a new installation, I’ve done it both ways, that is, I’ve completely removed everything, then reinstalled and I’ve also simply overwritten everything.

                              In my case I’ve even experimented with NOT overwriting everything; that’s NOT recommended, but I sometimes do NOT recommended activity so that I can better understand how things work. After I do my crazy experiments, THEN I wipe them out and do things the proper way!

                              So to repeat, the best method is to remove previous systems, then install the new system.

                              --
                              Brian Masinick
                              Alternate "Search B":
                              This search page

                              #185598
                              BobC
                              Moderator

                                I will need to try these out to feel comfortable, before attempting the upgrade.

                                ** Another question is,

                                What should I keep in mind if I wish to switch to a runit install from the current sysvinit with the upgrade? Is that usually best done as a fresh install after backup? (This particular computer doesn’t have room for just adding a fresh install in new partitions.)

                                Yes, that’s how I’d go about it. I haven’t done a SysV to Runit migration, but I expect it will take more effort with my scripts because the script is oriented towards migrating your changes from the old system to the new one. You will need to be careful not to remove runit code, and not add sysv code to your new runit system when you migrate it. You might get lucky and it all just goes pretty well when you are doing your testing. That’s how my migrations have gone, but having that extra backup has always made it comforting to do,knowing I could always reload and try it again if I got it messed up.

                                Here is the link to SEARCH THE FORUM >> http://www.antixforum.com/search-forums

                                #185599
                                BobC
                                Moderator

                                  PS: Do double check that your backup USB is for sure bootable and all works BEFORE erasing or changing what’s on the disk drive.

                                  Here is the link to SEARCH THE FORUM >> http://www.antixforum.com/search-forums

                                Viewing 15 posts - 1 through 15 (of 24 total)
                                • You must be logged in to reply to this topic.