OS backup / restore process , alternative method

Moderator: Forum moderators

Post Reply
darksun
Posts: 163
Joined: Tue Dec 19, 2023 10:12 am
Has thanked: 55 times
Been thanked: 62 times

OS backup / restore process , alternative method

Post by darksun »

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

Code: Select all

~/mylinux$ ls
bookmarks.html  softwareB.conf  stubby.yml
diary.txt       sofwareA.conf   mywallpaper.jpg
urls		config	jwm

into that folder I put / save / export, all the configuration files you use on your OS and additional software installed that needs to me added/amended AFTER fresh installation.

the "magic" is done by the text file, example name diary.txt

where you list, step by step, hopefully in chronological order, everything you do post fresh (new) installation of your OS.

Into diary.txt I put BOTH terminal commands for a simple copy/paste into the terminal and AS WELL AS instructions of things to do POST fresh installation.

example of a diary.txt:

Code: Select all

# apt update && apt install p7zip-full

LXTERMINAL set palette: tango

set mywallpaper.jpg

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 &

https://mullvad.net/en/download/browser/linux
set default web browser "run-as-spot mullvad-browser"

# 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

restore softwareA.conf

restore softwareB.conf

# 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.

User avatar
bigpup
Moderator
Posts: 7249
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 942 times
Been thanked: 1596 times

Re: OS backup / restore process , alternative method

Post by bigpup »

apt commands are only going to work if the Puppy version has apt package manager.

Right now only a few do have it.

what if you do not have apt?

Installing apt is not something easily done.
The Puppy version needs to have it already there to use.
Compiled into the Puppy version build, when it was produced.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

darksun
Posts: 163
Joined: Tue Dec 19, 2023 10:12 am
Has thanked: 55 times
Been thanked: 62 times

Re: OS backup / restore process , alternative method

Post by darksun »

of course you install your software according to your operating system, I apply this method to my debian based Linux and my android but it can be applied to any OS, including Windows , Mac and so on. It is the HOW TO idea, the methodology, I wanted to share.

Post Reply

Return to “Tips & Tweaks”