Siduction Forum
Siduction Forum => Scripting & Kernelhacking => Topic started by: hamatoma 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.
-
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.
-
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.
-
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
-
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.
-
Good proposals from coruja + musca in #siduction-de:
apt-mark showmanual
aptitude search '~S~i!~M' -F '%p'
The file /var/lib/apt/extended_states contains the info:
Package: libqmobipocket1
Architecture: amd64
Auto-Installed: 1
-
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!
$ 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