Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] Minimal system backup  (Read 8280 times)

hamatoma

  • Guest
[EN] Minimal system backup
« on: 2014/05/16, 21:49:00 »
I am making a script which backups a linux system with minimal space requirements.
The idea: Do not save the packages, save the configuration.
The following will be done by the script:
  • save the list of installed packages: dpkg -l|awk '/^ii/{ print $2 }'|grep -v -e ^lib -e -dev -e $(uname -r) > packetlist.txt
  • save /etc
  • save /boot
  • save /dev
  • store system info: partition info, debin/siduction version
  • save boot sectors from all physical disks
Did I forget something?
On my system these savings need 70 MByte.

« Last Edit: 2014/05/17, 11:31:46 by hamatoma »

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: Minimal system backup
« Reply #1 on: 2014/05/17, 10:28:22 »
Hi hama,
the user configuration in /home will not you back up with? So, for example, All "." files in $HOME. I would integrate it with in a minimum backup.

hamatoma

  • Guest
Re: Minimal system backup
« Reply #2 on: 2014/05/17, 11:27:19 »
Home needs to much space and I think that the backup of system and user data should be separated:
User data must be saved much more often than system data.

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Re: Minimal system backup
« Reply #3 on: 2014/05/22, 21:27:39 »
hello hamatoma,

the package list needs a lot of care.

I think with  "grep -v -e ^lib" you are deleting the whole libreoffice suite (and maybe more, that we are not aware).

Also i think about the packages loosing the state of being automatically installed or manually installed.
Is this a matter to discuss, or isn't it important at all?

What about dpkg --get-selection / --set-selection  or aptitude-create-state-bundle / aptitude-run-state-bundle ?

greetings
musca

„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)

hamatoma

  • Guest
Re: Minimal system backup
« Reply #4 on: 2014/05/22, 22:23:10 »

I think with  "grep -v -e ^lib" you are deleting the whole libreoffice suite (and maybe more, that we are not aware).

This is not a real problem: If a lib* package is needed by another the apt/dpkg command will install this automatically. If not it is not needed.
This filter avoids a long package list and not needed libraries.Note: the list will be used to add some packages to a fresh installed system. It need not to be a complete list of packages.


« Last Edit: 2014/05/22, 22:35:47 by hamatoma »

hamatoma

  • Guest
Re: Minimal system backup
« Reply #5 on: 2014/05/22, 22:42:59 »
Good proposals from coruja + musca in #siduction-de:
Code: [Select]
apt-mark showmanual
 aptitude search '~S~i!~M' -F '%p'

The file  /var/lib/apt/extended_states contains the info:
Code: [Select]
Package: libqmobipocket1
Architecture: amd64
Auto-Installed: 1

Offline musca

  • User
  • Posts: 725
  • sid, fly high!
Re: Minimal system backup
« Reply #6 on: 2014/05/23, 00:27:34 »
hello hamatoma,

the names of the libreoffice packages all start with "lib", but they do contain applications, not just libs.
And they are manually installed, because we don't ship them in the standard installation.

Now think about future names like libreSSL! 

Code: [Select]
$ dpkg -l | grep libreoffice
ii  libreoffice                                 1:4.2.4-3                           amd64        office productivity suite (metapackage)
ii  libreoffice-avmedia-backend-gstreamer       1:4.2.4-3                           amd64        GStreamer backend for LibreOffice
ii  libreoffice-base                            1:4.2.4-3                           amd64        office productivity suite -- database
ii  libreoffice-base-core                       1:4.2.4-3                           amd64        office productivity suite -- shared library
ii  libreoffice-base-drivers                    1:4.2.4-3                           amd64        Database connectivity drivers for LibreOffice
ii  libreoffice-calc                            1:4.2.4-3                           amd64        office productivity suite -- spreadsheet
ii  libreoffice-common                          1:4.2.4-3                           all          office productivity suite -- arch-independent files
ii  libreoffice-core                            1:4.2.4-3                           amd64        office productivity suite -- arch-dependent files
ii  libreoffice-draw                            1:4.2.4-3                           amd64        office productivity suite -- drawing
ii  libreoffice-help-de                         1:4.2.4-3                           all          office productivity suite -- German help
ii  libreoffice-impress                         1:4.2.4-3                           amd64        office productivity suite -- presentation
ii  libreoffice-java-common                     1:4.2.4-3                           all          office productivity suite -- arch-independent Java support files
ii  libreoffice-kde                             1:4.2.4-3                           amd64        office productivity suite -- KDE integration
ii  libreoffice-l10n-de                         1:4.2.4-3                           all          office productivity suite -- German language package
ii  libreoffice-math                            1:4.2.4-3                           amd64        office productivity suite -- equation editor
ii  libreoffice-report-builder-bin              1:4.2.4-3                           amd64        LibreOffice component for building database reports -- libraries
ii  libreoffice-style-galaxy                    1:4.2.4-3                           all          office productivity suite -- Galaxy (Default) symbol style
ii  libreoffice-writer                          1:4.2.4-3                           amd64        office productivity suite -- word processor

greetings
musca
„Es irrt der Mensch, solang er strebt.“  (Goethe, Faust)