How to take an “exact-replica-snapshot” of my system?

Forum Forums New users New Users and General Questions How to take an “exact-replica-snapshot” of my system?

  • This topic has 6 replies, 4 voices, and was last updated Jul 29-9:00 pm by anilkagi.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #39499
    Member
    anilkagi

      Hello there,

      I have painstakingly installed a system from ‘19.2.1-Base’.

      I want to take a snapshot of the system that is an exact replica of my current system, excluding ONLY the Desktop, Documents, Music, Pictures, Downloads, Videos directories. I want to retain everything else of the OS as it is, so that when/if I install from that snapshot, I should get an exact system that I was using before, even including the User accounts & their passwords, Firefox settings, everything. I should not have to do anything like configuring, even setting passwords. I should be able to start working straight away.

      Is that possible? How to do it?

      Thanks & Regards

      #39503
      Member
      Xecure
        Helpful
        Up
        0
        ::

        Use the snapshot tool included in antiX. Add all folders you don’t want in the snapshot to the exclude list.

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #39506
        Member
        anilkagi
          Helpful
          Up
          0
          ::

          Thanks Xecure for coming.

          Actually I checked that. However, there is an option to “Edit exclusion file” in the snapshot wizard. When I click on it a file opens in which a list is given, which would be excluded from the snapshot.

          If those are excluded, will the snapshot be an exact replica?

          In that file, under the heading “# Do NOT edit this entry block unless you know what you are doing”, there is a list of a lot of system files namely;

          .bind-root
          .config
          .fehbg
          lost+found
          swapfile
          tmp
          dev/*
          cdrom/*
          live/*
          media/*
          mnt/*
          sys/*
          proc/*
          run/*
          boot/grub/!(themes|unicode.pf2)
          etc/adjtime
          etc/bcm-ckd
          etc/blkid.tab.old
          etc/defaultdomain
          etc/crypttab
          etc/fstab.backup
          etc/ioctl.save
          etc/live/protect
          etc/machine-id
          etc/mailname
          etc/mtab
          etc/NetworkManager/system-connections/*
          etc/udev/rules.d/70-persistent-cd.rules
          etc/udev/rules.d/70-persistent-net.rules
          etc/resolv.conf
          etc/X11/xorg-bus-id
          home/timeshift/snapshots
          home/snapshot
          root/.bash_history
          root/.dbus
          root/.gconf
          root/.gnome2
          root/keyfile
          timeshift/snapshots
          var/cache/apt/archives/*.deb
          var/cache/apt-xapian-index/index.*
          var/cache/apt-show-versions/*
          var/cache/apt/*.bin
          var/cache/apt/apt-file/*
          var/cache/debconf/*-old
          var/cache/lightdm
          var/cache/samba/browse.dat
          var/lib/apt/lists/*
          var/lib/connman/*
          var/lib/dbus/machine-id
          var/lib/dhcp/*
          var/lib/dpkg/*-old
          var/lib/lightdm/.cache
          var/lib/lightdm/.Xauthority
          var/lib/NetworkManager/*
          var/lib/nfs/rpc_pipefs/*
          var/lib/sudo/*
          var/lib/udisks/*
          var/lib/urandom/*
          var/log/!(samba|clamav)
          var/log/clamav/*
          var/log/samba/*
          var/mail/*
          var/spool/mail/*
          var/tmp/*
          var/cache/brightness-settings-cache/*

          And then below that there is another heading saying “# Entries below this can be edited by the user. If you have any large files or directories, you should exclude them from being copied by adding them to this list.”

          Again under this heading there are many configuration files like;

          
          home/*/.cache/mozilla/firefox/*/cache2/*
          home/*/.cache/mozilla/firefox/*/thumbnails/*
          home/*/.mozilla/firefox/*/Cache/*
          home/*/.mozilla/firefox/*/cache2/*
          home/*/.mozilla/seamonkey/*/Cache/*
          home/*/.adobe
          home/*/.keyfileDONOTdelete
          home/*/.macromedia
          home/*/.thumbnails/*
          home/*/.Trash*
          home/*/.local/share/Trash/*
          # home/*/.cache
          home/*/.gvfs
          home/*/.bash_history
          home/*/.recently-used
          home/*/.recently-used.xbel
          home/*/.VirtualBox
          home/*/VirtualBox VMs
          home/*/.xsession-errors*
          home/*/.xfce4-session.verbose-log*

          And then there is another heading that says “# This stops any video drivers from loading – safe option.”

          etc/X11/xorg.conf
          etc/X11/xorg.conf.d/20-nvidia.conf
          etc/X11/xorg.conf.d/20-intel.conf
          etc/X11/xorg.conf.d/20-radeon.conf
          etc/X11/xorg.conf.d/20-amd.conf

          My question is, if we exclude all these files, will the snapshot be the exact replica? What If I delete all these and keep only the following list in the file?

          home/*/Desktop/*
          home/*/Downloads/*
          home/*/Music/*
          home/*/Pictures/*
          home/*/Videos/*
          
          # Other possible exclusions
          usr/share/doc/*

          By deleting everything except the above small list, will the snapshot be the exact replica and the consequent installation from it, work properly?

          Thanks

          #39525
          Anonymous
            Helpful
            Up
            0
            ::

            What If I delete all these and keep only the following list

            In that case, the snapshot operation would never reach completion.
            Consider:
            sys/*
            proc/*
            ^——— these filepaths represent “virtual filesystems”, and their content (at least /sys/, I reckon) is generated dynamically, on-the-fly. Attempting to traverse and read the content of each subdirectory therein during snapshot operation will recursively (endlessly) generate further virtual subdirectories…

            home/snapshot/
            ^——— copies of any previously-generated ISO files output from snapshot operations reside here.
            They are huge, and copies of ’em would needlessly be packed into the new snapshot ISO file.

            re: โ€œ# Do NOT edit this entry block unless you know what you are doingโ€
            The pattern (filepath) conveyed within each line of the default excludes list(s) for a good, sound, reason.
            Various reasons. The 3 most common are: inclusion would cause recursion; inclusion would render the resulting image unbootable; inclusion would needlessly bloat the size of the produced ISO (contents of /tmp/ for instance)

            var/cache/apt/archives/*.deb
            Maybe you have only a few, or a cumulatively small set of, deb files onhand and _do_ wish to preserve them within the snapshot, in order to avoid re-downloading them? (Will be later booting the system on a machine without internet access, for instance, and those /archives/ debfiles are packages which you tried, then uninstalled on THIS system but did not delete because you expect you’ll want to have them onhand when performing customizations to the system, later, on another machine.)

            home/*/.cache/mozilla/firefox/*/thumbnails/*
            home/*/.mozilla/firefox/*/Cache/*
            Someone who has bandwidth-metered internet access may indeed wish to preserve copies of browser-cached files, but the DEFAULT represents the likelihood that one’s preference would be to “avoid needless bloat” (size of generated ISO, and time necessary to perform the snapshot operation ~~ compressing myriad extra files into it).

            etc/X11/xorg.conf.d/20-nvidia.conf
            Need to consider: If on THIS machine you have installed a vendor-specific driver, and you neglect to exclude it from the snapshot…
            later you would be unable to boot the snapshotted system on a machine containing an AMD graphics card, eh.

            #39551
            Member
            anilkagi
              Helpful
              Up
              0
              ::

              Many many thanks for taking the pains to explain this in such detail. Very compassionate of you.

              I am going to read this again and again.

              I have some thoughts too. I will come back. I was searching the forum-archives and I got one of your old conversations regarding this. I understand it is a very intricate matter.

              Thanks again skidoo for your efforts. Love you man. You are a great man.

              • This reply was modified 2 years, 9 months ago by anilkagi.
              #39568
              Moderator
              christophe
                Helpful
                Up
                0
                ::

                FWIW, anilkagi, you may want to to do a snapshot with defaults, then make a live ubs with the image (assuming you have a spare usb stick to test on). Then boot the new live usb. If it works as expected, then great. If it doesn’t, then you know for a fact that there is something you need to tweak on the snapshot exclude list.

                confirmed antiX frugaler, since 2019

                #39586
                Member
                anilkagi
                  Helpful
                  Up
                  0
                  ::

                  Christophe, thanks for your suggestions.

                  I did that, before skidoo came. I was just doing trial and error. I created two snapshots. One with the default settings and the other with what I wanted to tweak, with the best of my knowledge.

                  Now I have created a Live USB with my tweaked version and I am checking its functioning. I find that some things are not working but they are not connected to my tweaks, like I am not able to start Gparted. I can start Gnome-disks-utility, Rox filer (but it is slow to start for the first time), Firefox, LibreOfficeWriter, Kolourpaint (I had installed it on my installed system), even the file-application associations, ha ha ha! this is simply amazing, the Control-center (interestingly there is nothing left to do with the control-center. It’s all done. :), what a beauty. Antix, ILU). My god! this Snapshot thing, that the Antix team has created, is one of the greatest inventions of the computing world. To my surprise, Firefox, the one thing that I tweaked, is the exact-replica of what I created on my system, is working fantastic. I have customized my Firefox a lot. It has come ready with all my customization, out-of-the-box. I got what I wanted, in that. In fact I am posting this on the Live USB session, I didn’t have to enter my password to login. It was as if I was on my installed system. And then LibreOffice-Writer & Ibus duo; the most important section of my computer, are working with all the changes I have made. Those changes are a nightmare to me. I hate do it again, if I have to. Those changes are about typing in my regional language. To my delight, it has come out-of the-box, with all my customization. It’s working fantastic. But I am not sure if it has got anything to do with my editing the snapshot exclusion file, because I didn’t do anything related to it. And another sweet surprise is, the snapshot has come ready, even with the user account I had created ๐Ÿ˜€ ๐Ÿ˜€ :D. I am still checking things out. I don’t know why Gparted didn’t start from the menu? I use it to mount partitions, when I am on a Live USB, it helps graphically identifying partitions to mount. I tried to mount them with Gnome-disks but it didn’t work, either. Then I tried;

                  
                  sudo blkid
                  sudo mount /dev/sda2

                  it worked. Now I can open those partitions on Rox-filer & SpaceFM both. I don’t know why Gparted & Disks couldn’t do it earlier when started from Menu?

                  And then as a last resort I did this on CLI;

                  sudo gparted
                  GParted 1.0.0
                  configuration --enable-libparted-dmraid --enable-online-resize
                  libparted 3.2

                  Bingo, Gparted started and it is working. I can now start it from the menu too.

                  I am still checking things out. I will report back. If this is successful, you know, I can carry MY Antix-OS on a Live USB, with all my customization, my-customised-browser, my-customised-office, my-user-accounts, etc, wherever I go, even my desktop-background ๐Ÿ˜€ ๐Ÿ˜€ :D.

                  One surprise is, while lot of things came as customized, the Leafpad, didn’t come that way. I had enabled the word Wrap. ๐Ÿ™‚ (Just reporting things here.)

                  I haven’t tried the default snapshot yet. (Of course it is the default one, it has to work better.) I don’t know if all this is worth the trouble or not, but at the end of the day, I would get to know Antix, better. I suppose, that surely helps, me and others like me. Basically all this is an exercise to get to know Anix & Linux better, with the help of all you knowledgeable guys. Thanks.

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