Since many years of experience ( = failures ) in this area I am using my personal way to backup and restore my OSs (desktop and mobile too, same methodology applies).
The "standard" way of managing operating system's backups and restores them involve the usage of dedicated software and procedures, with the real and/or potential downsides of them:
being buggy
becoming discontinued
creating big backup file(s), of which the majority are bloat, as they contain operating system and installed software' files that can be easily re-downloaded post fresh installation
needs to be done again and again (backup) when a chosen event occurs (OS update, major change in your custom settings) ; this is media storage space and time consuming
there are other real/potential downsides but I would stop here
My method
I want to have a easy, scalable, portable, essential way to back up and restore that not only avoid the above mentioned but also has other benefits.
All names below are invented, you can adapt to your own need and please.
I have/create a folder called, for example, mylinux
into that folder I put / save / export, all your configuration files you use on your (1) OS and with your (2) additional software installed that needs to me added/amended AFTER fresh installation.
Code: Select all
~/mylinux$ ls
bookmarks.html softwareB.conf stubby.yml
diary.txt sofwareA.conf mywallpaper.jpg
urls config jwm
the "magic" is done by using text file where you can list and keep notes of all the changes you adopt POST fresh installation.
Let's name it for example name diary.txt
Like I said in there you list, step by step, wisely in chronological order if it is important, everything you do post fresh (new) installation of your OS
eg: software you install, configuration you amend, things you tweak and so on.
Into diary.txt I put BOTH (a) terminal commands for a simple copy/paste into the terminal and AS WELL AS (2) instructions of things to do POST fresh installation.
example of a diary.txt:
Code: Select all
LXTERMINAL set palette: tango
set mywallpaper.jpg
# apt install ffmpeg keepassxc qpdfview aria2 curl newsboat w3m bmon iftop nethogs handbrake libimage-exiftool-perl mpv webp webp-pixbuf-loader mp3wrap tofrodos htop ncdu units p7zip-full poppler-utils recordmydesktop torbrowser-launcher
https://mullvad.net/en/download/browser/linux
set default web browser "run-as-spot mullvad-browser"
restore configuration files softwareA.conf
restore configuration files softwareB.conf
import jwm toolbar settings (exported and saved into mylinux folder)
### append to .bashrc ###
unset HISTFILE
set +o history
alias ls='ls --color=auto'
alias ll='ls -lh'
alias whatsmounted='fdisk -l;blkid; lsblk ; parted -l ; mount | column -t ; df -h'
alias speecy='neofetch ; inxi -Fx ; lshw -short ; lsusb ; hwinfo --short ; lspci ;lsscsi'
alias temperatures='watch sensors'
alias pdfcompress='ps2pdf -dPDFSETTINGS=/ebook input.pdf outputpdf'
alias shred='shred -zuvf'
alias history_apt='less /var/log/apt/history.log'
alias myippublic='curl https://ifconfig.co/json'
alias myipprivate='ip addr show ; iwconfig ; iwgetid; route -n ; ip route show ; cat /etc/resolv.conf ; arp -av'
alias x='exit'
alias p='poweroff'
alias r='reboot'
alias s='echo -n mem > /sys/power/state && xlock'
alias easy_dd='cat "image_file.iso" | dd of=/dev/sda bs=1M conv=fsync status=progress oflag=sync'
alias PUPSTATE='less /etc/rc.d/PUPSTATE'
alias sys5init='service --status-all'
alias DISTRO_SPECS='cat /etc/DISTRO_SPECS'
alias torbrowser-launcher='run-as-spot torbrowser-launcher'
### .bashrc EOF ###
# apt install stubby
# mv stubby.yml /etc/stubby/
# echo "stubby >/dev/null 2>&1 &" >> /etc/rc.d/rc.local
# configure network manager's nameserver to 127.0.0.1 ,for IPv6 ::1
# stubby &
# newsboat
- restore .newsboat urls and config
[manual install]
# cd
# wget git.io/trans && chmod +x ./trans
# curl -sSL https://raw.githubusercontent.com/aandrew-me/tgpt/main/install | bash -s /usr/local/bin
# curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/bin/yt-dlp && chmod a+rx /usr/bin/yt-dlp
- download https://github.com/macvk/dnsleaktest/blob/master/dnsleaktest.sh
# mv trans dnsleaktest.sh /usr/bin/
# leafpad /etc/w3m/config
manually set:
use_history 0
use_cookie 0
display_image 0
# redshiftgui-64
https://forum.puppylinux.com/viewtopic.php?p=3107
copy it into /root/Startup/
There are so many benefits on doing in this way that I should write a long list. Some are:
no need of extra , dedicated software. just a text editor. that is all.
as long as I keep my diary.txt up to date, once populated, I am done! and I read/update it occasionally, either post fresh OS installation or when there is an important change I want to persist next time I do a fresh OS re installation
my backup file is a tiny fraction, in terms of HD space taken
I can 7z the folder and backing it up basically anywhere, anytime, and read/amend it everywhere, as diary.txt is a text file
my backup file does not contain many GB of files that are kept for no reasons, because the OS ISO and additional software can be easily re-downloaded, no need to be part of the backup.
Of course keepign the OS as close as defaults post installation simplify this process, but I anyway like to keep things as much close as defaults and amend things only when really necessary.
EDIT: grammars and sentence adjustments to make concepts clearer.