You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



How do you make a backup?

Author (Read 4170 times)

0 Members and 1 Guest are viewing this topic.

Re: How do you make a backup?
« Reply #4 on: October 28, 2020, 11:02:48 PM »
 

Francois Bonin

  • New to Forums
  • *
  • 7
    Posts
  • Reputation: 0
    • View Profile
I a;ways make a complete snapshot with all selected , and today i restored to a different drive , smaller partition , no problems.Timeshift is great!
 

Re: How do you make a backup?
« Reply #3 on: September 10, 2020, 08:17:48 PM »
 

jack action

  • New to Forums
  • *
  • 16
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile

  • Kernel: 5.x
Hope this helps! :)
It does. Thank you! :)
 

Re: How do you make a backup?
« Reply #2 on: September 08, 2020, 12:00:48 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1134
    Posts
  • Reputation: 126
  • Linux Lite Member
    • View Profile

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
SO my SSD gave up recently and I had to restore a complete backup for the first time in my life.

Fed up with available backup programs where I'm never sure what they do and not sure how they restore files, I did my own backup of the entire file system with tar. (Basically tar -cvz -g backup.snar -f backup-000.tar.gz / with a bunch of excluded directories.) This way, I at least know where my files are and how they will be restored (i.e. manually by me).

The basic principle was that if I had a problem, I could always load LL again and then blindly unzip my backup over it to regain my system. Easy.

My problem arise when upgrading from series 4.X to 5.X. In such a case, I know that I cannot blindly overwrite a fresh install of the new series with files from the old series. Some files will be obsolete and clutter my SSD, some old files would overwrite the new ones and missing new features, maybe even broke some programs.

What I did was that I installed LL 5.0, then reinstalled all programs I had (based on my memory and looking at my backup files in /bin), then unzip my backed up home directory (even partly, because some programs like Pinta are not included in LL 5.0). But there are a lot of personal files which are not in the home directory. For example, mysql stores the databases in /var/lib/mysql. Emails are in /var/mail and cronjobs are in /var/spool/cron/crontabs/. I even found a VirtualBox folder in /opt.

The worst thing I found was a theme for Notepadqq. After reinstalling Notepadqq, I lost my setting for the appearance theme. We only have a choice between a selection of themes. I remember I did something special when I configured it, but couldn't remember it. By looking at the .ini file of the program, I finally realized that - 2 years ago - I build my own .css file (which is how the themes are stored) and put it with the other themes (after looking all around for them) in /usr/share/notepadqq/editor/libs/codemirror/theme/.

Are there other forgotten files like that? I don't know. I'm keeping my old backup for a while, just in case new problems arise.

So my question is: How do you keep track of all the files that you need to restore when upgrading from one series to another? Because it seems to be a very tedious job to upgrade from one series to another, certainly not one for an inexperienced user.

Code: [Select]
dpkg --get-selections > selections.txt will create a list of all the pkgs installed on your system which you can save to a text file for later use. There's also
Code: [Select]
apt-mark showmanual which can be used to print a list of manually installed packages. You can also inspect apt logs in /var/log/apt which save information on pkgs installed. What I've been doing from some time now is that whenever I install a new pkg, I save that info to a .txt in my backup folder. I even wrote a small script I use whenever I need to install/reinstall my system which takes care of installing those pkgs. Something like:
Code: [Select]
#!/bin/bash
#Install new pkgs on new or reinstalled system
sudo apt-get install -y; pkg1 pkg2 pkg3 pkg4 ...

I simply named it install. You can do that too and add pkgs to the list as needed so when the time comes you're all set, i.e, you just installed a new pkg, open your "install" script with your preferred editor and add it to the list. 

Hope this helps! :)

Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

How do you make a backup?
« Reply #1 on: September 07, 2020, 09:31:55 PM »
 

jack action

  • New to Forums
  • *
  • 16
    Posts
  • Reputation: 4
  • Linux Lite Member
    • View Profile

  • Kernel: 5.x
SO my SSD gave up recently and I had to restore a complete backup for the first time in my life.

Fed up with available backup programs where I'm never sure what they do and not sure how they restore files, I did my own backup of the entire file system with tar. (Basically tar -cvz -g backup.snar -f backup-000.tar.gz / with a bunch of excluded directories.) This way, I at least know where my files are and how they will be restored (i.e. manually by me).

The basic principle was that if I had a problem, I could always load LL again and then blindly unzip my backup over it to regain my system. Easy.

My problem arise when upgrading from series 4.X to 5.X. In such a case, I know that I cannot blindly overwrite a fresh install of the new series with files from the old series. Some files will be obsolete and clutter my SSD, some old files would overwrite the new ones and missing new features, maybe even broke some programs.

What I did was that I installed LL 5.0, then reinstalled all programs I had (based on my memory and looking at my backup files in /bin), then unzip my backed up home directory (even partly, because some programs like Pinta are not included in LL 5.0). But there are a lot of personal files which are not in the home directory. For example, mysql stores the databases in /var/lib/mysql. Emails are in /var/mail and cronjobs are in /var/spool/cron/crontabs/. I even found a VirtualBox folder in /opt.

The worst thing I found was a theme for Notepadqq. After reinstalling Notepadqq, I lost my setting for the appearance theme. We only have a choice between a selection of themes. I remember I did something special when I configured it, but couldn't remember it. By looking at the .ini file of the program, I finally realized that - 2 years ago - I build my own .css file (which is how the themes are stored) and put it with the other themes (after looking all around for them) in /usr/share/notepadqq/editor/libs/codemirror/theme/.

Are there other forgotten files like that? I don't know. I'm keeping my old backup for a while, just in case new problems arise.

So my question is: How do you keep track of all the files that you need to restore when upgrading from one series to another? Because it seems to be a very tedious job to upgrade from one series to another, certainly not one for an inexperienced user.
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section