[opensuse] /var/adm/backup/rpmdb
The cron script cron.daily makes daily copies of the database (packed with gzip) and stores them in /var/adm/backup/rpmdb. The number of copies is controlled by the variable MAX_RPMDB_BACKUPS (default: 5) in /etc/sysconfig/backup. The size of a single backup is approximately 1 MB for 1 GB in /usr. 1-Why 5? 2-What do I loose if if I keep 1 or 2 instead of 5? 3-What do they offer that rpm --rebuilddb doesn't? 4-Why isn't rebuilddb in the rpm manual? 5-Why 30,000k per backup file? (My /usr is typically <3G total, including /usr/local/ which is on a separate filesystem.)
From TW20181124: /var/adm/backup/rpmdb# ls -Ggh total 134M -rw-r--r-- 1 27M Jul 29 06:24 Packages-20180729.gz -rw-r--r-- 1 27M Aug 2 03:50 Packages-20180802.gz -rw-r--r-- 1 27M Sep 30 13:48 Packages-20180930.gz -rw-r--r-- 1 27M Dec 1 20:38 Packages-20181201.gz -rw-r--r-- 1 27M Dec 2 00:04 Packages-20181202.gz -rw-r--r-- 1 36 Dec 2 00:04 rpmdb_recent_md5 -- Evolution as taught in public schools is religion, not science.
Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
The cron script cron.daily makes daily copies of the database (packed with gzip) and stores them in /var/adm/backup/rpmdb. The number of copies is controlled by the variable MAX_RPMDB_BACKUPS (default: 5) in /etc/sysconfig/backup. The size of a single backup is approximately 1 MB for 1 GB in /usr.
1-Why 5? 2-What do I loose if if I keep 1 or 2 instead of 5? 3-What do they offer that rpm --rebuilddb doesn't? 4-Why isn't rebuilddb in the rpm manual? 5-Why 30,000k per backup file? (My /usr is typically <3G total, including /usr/local/ which is on a separate filesystem.)
From TW20181124: /var/adm/backup/rpmdb# ls -Ggh total 134M -rw-r--r-- 1 27M Jul 29 06:24 Packages-20180729.gz -rw-r--r-- 1 27M Aug 2 03:50 Packages-20180802.gz -rw-r--r-- 1 27M Sep 30 13:48 Packages-20180930.gz -rw-r--r-- 1 27M Dec 1 20:38 Packages-20181201.gz -rw-r--r-- 1 27M Dec 2 00:04 Packages-20181202.gz -rw-r--r-- 1 36 Dec 2 00:04 rpmdb_recent_md5 First: no need for cron, these days a systemd service takes care of backing up
Op zondag 27 januari 2019 11:38:35 CET schreef Felix Miata: the rpm database. -- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Knurpht-openSUSE composed on 2019-01-27 11:43 (UTC+0100):
Felix Miata composed:
The cron script cron.daily makes daily copies of the database (packed with gzip) and stores them in /var/adm/backup/rpmdb. The number of copies is controlled by the variable MAX_RPMDB_BACKUPS (default: 5) in /etc/sysconfig/backup. The size of a single backup is approximately 1 MB for 1 GB in /usr.
1-Why 5? 2-What do I loose if if I keep 1 or 2 instead of 5? 3-What do they offer that rpm --rebuilddb doesn't? 4-Why isn't rebuilddb in the rpm manual? 5-Why 30,000k per backup file? (My /usr is typically <3G total, including /usr/local/ which is on a separate filesystem.)
From TW20181124: /var/adm/backup/rpmdb# ls -Ggh total 134M -rw-r--r-- 1 27M Jul 29 06:24 Packages-20180729.gz -rw-r--r-- 1 27M Aug 2 03:50 Packages-20180802.gz -rw-r--r-- 1 27M Sep 30 13:48 Packages-20180930.gz -rw-r--r-- 1 27M Dec 1 20:38 Packages-20181201.gz -rw-r--r-- 1 27M Dec 2 00:04 Packages-20181202.gz -rw-r--r-- 1 36 Dec 2 00:04 rpmdb_recent_md5
First: no need for cron, these days a systemd service takes care of backing up the rpm database.
That paragraph reference to cron is a copy and paste from: https://doc.opensuse.org/documentation/leap/reference/single-html/book.opens... I can imagine generation of those big files surely must play a part in the sluggishness referred to in recent mailing list and forum discussions. -- Evolution as taught in public schools is religion, not science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
27.01.2019 13:38, Felix Miata пишет:
The cron script cron.daily makes daily copies of the database (packed with gzip) and stores them in /var/adm/backup/rpmdb. The number of copies is controlled by the variable MAX_RPMDB_BACKUPS (default: 5) in /etc/sysconfig/backup. The size of a single backup is approximately 1 MB for 1 GB in /usr.
1-Why 5?
Why not? You have to pick up some number by default.
2-What do I loose if if I keep 1 or 2 instead of 5?
You have less time to realize something went wrong. Although with btrfs with enabled snapshots you have database backup as part of snapshot anyway, and exactly at the right time - immediately before it gets changed - so usefulness of this periodical job is questionable.
3-What do they offer that rpm --rebuilddb doesn't?
rpm --rebuilddb recreates other files from Packages. You still need consistent Packages to start with.
4-Why isn't rebuilddb in the rpm manual?
Because nobody took time to submit a patch?
5-Why 30,000k per backup file?
Because this is the size to which Packages gets compressed. If you want to know why it gets compressed to this size you probably need to ask on gzip list. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/01/2019 11.54, Felix Miata wrote:
Knurpht-openSUSE composed on 2019-01-27 11:43 (UTC+0100):
Felix Miata composed:
The cron script cron.daily makes daily copies of the database (packed with gzip) and stores them in /var/adm/backup/rpmdb. The number of copies is controlled by the variable MAX_RPMDB_BACKUPS (default: 5) in /etc/sysconfig/backup. The size of a single backup is approximately 1 MB for 1 GB in /usr.
It doesn't depend on the /usr size, but on the number of packages. Maybe on the number of files, if the database stores a list of files per package, dunno.
1-Why 5?
Nice number
2-What do I loose if if I keep 1 or 2 instead of 5?
Sometimes 5 is not enough. I have it set to 10, because I found out that 5 was not enough. If you are unlucky enough to *need* this backup, and you find this out a week after the breakage, you are doomed, but I am not :-P
3-What do they offer that rpm --rebuilddb doesn't?
Because sometimes it doesn't work, and you need instead to replace the database. Happened to me /once/. Mind you, once is enough.
4-Why isn't rebuilddb in the rpm manual?
It is on another manual. Let me see if I can find it [...] no luck so far [...] man -K rebuilddb finds it. RPMDB(8) rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY] Use --initdb to create a new database if one doesn't already exist (existing database is not overwrit- ten), use --rebuilddb to rebuild the database indices from the installed package headers. Well, there it is :-) If you found "rpm --rebuilddb" in some doc, it is old and has not been corrected. It is "rpmdb --rebuilddb".
5-Why 30,000k per backup file? (My /usr is typically <3G total, including /usr/local/ which is on a separate filesystem.)
Mine are 110854615..113125097 bytes each. Don't complain :-P
From TW20181124: /var/adm/backup/rpmdb# ls -Ggh total 134M -rw-r--r-- 1 27M Jul 29 06:24 Packages-20180729.gz -rw-r--r-- 1 27M Aug 2 03:50 Packages-20180802.gz -rw-r--r-- 1 27M Sep 30 13:48 Packages-20180930.gz -rw-r--r-- 1 27M Dec 1 20:38 Packages-20181201.gz -rw-r--r-- 1 27M Dec 2 00:04 Packages-20181202.gz -rw-r--r-- 1 36 Dec 2 00:04 rpmdb_recent_md5
Mine are 1,220,439 KiB in 10 files. Safe and cozy :-p
First: no need for cron, these days a systemd service takes care of backing up the rpm database.
Irrelevant :-) Anyway, I do not see the advantage of systemd timers.
That paragraph reference to cron is a copy and paste from:
https://doc.opensuse.org/documentation/leap/reference/single-html/book.opens...
I can imagine generation of those big files surely must play a part in the sluggishness referred to in recent mailing list and forum discussions.
Maybe it can be moved to some point after boot. Or started with batch instead. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On Sun, 27 Jan 2019 14:00:15 +0100
"Carlos E. R."
4-Why isn't rebuilddb in the rpm manual?
It is on another manual. Let me see if I can find it [...] no luck so far [...]
man -K rebuilddb
finds it.
RPMDB(8)
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]
Use --initdb to create a new database if one doesn't already exist (existing database is not overwrit- ten), use --rebuilddb to rebuild the database indices from the installed package headers.
Well, there it is :-)
If you found "rpm --rebuilddb" in some doc, it is old and has not been corrected. It is "rpmdb --rebuilddb".
Err, surely you yourself found it. Although it is labelled 'RPMDB(8)' it actually claims 'rpm {--initdb|--rebuilddb} ...'. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/01/2019 21.04, Dave Howorth wrote:
On Sun, 27 Jan 2019 14:00:15 +0100 "Carlos E. R." <> wrote:
4-Why isn't rebuilddb in the rpm manual?
It is on another manual. Let me see if I can find it [...] no luck so far [...]
man -K rebuilddb
finds it.
RPMDB(8)
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]
Use --initdb to create a new database if one doesn't already exist (existing database is not overwrit- ten), use --rebuilddb to rebuild the database indices from the installed package headers.
Well, there it is :-)
If you found "rpm --rebuilddb" in some doc, it is old and has not been corrected. It is "rpmdb --rebuilddb".
Err, surely you yourself found it. Although it is labelled 'RPMDB(8)' it actually claims 'rpm {--initdb|--rebuilddb} ...'.
You are right! It is there. I think it was previously 'rpm {--initdb|--rebuilddb} ...', and then moved to rpmdb. The documentation was just moved to another man, but not edited. Bug found! -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 28/1/19 8:58 am, Carlos E. R. wrote:
On 27/01/2019 21.04, Dave Howorth wrote:
On Sun, 27 Jan 2019 14:00:15 +0100 "Carlos E. R." <> wrote:
4-Why isn't rebuilddb in the rpm manual? It is on another manual. Let me see if I can find it [...] no luck so far [...]
man -K rebuilddb
finds it.
RPMDB(8)
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]
Use --initdb to create a new database if one doesn't already exist (existing database is not overwrit- ten), use --rebuilddb to rebuild the database indices from the installed package headers.
Well, there it is :-)
If you found "rpm --rebuilddb" in some doc, it is old and has not been corrected. It is "rpmdb --rebuilddb". Err, surely you yourself found it. Although it is labelled 'RPMDB(8)' it actually claims 'rpm {--initdb|--rebuilddb} ...'. You are right! It is there.
I think it was previously 'rpm {--initdb|--rebuilddb} ...', and then moved to rpmdb. The documentation was just moved to another man, but not edited.
Bug found!
There's nothing better than creating confusion... :-(. So, which is it: 'rpm --rebuilddb' or 'rpmdb --rebuilddb'? BC -- 'When I use a word', Humpty Dumpty said, in a rather scornful tone, 'it means just what I choose it to mean.' Lewis Carroll, Through the Looking-Glass -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 31/01/2019 07.46, Basil Chupin wrote:
On 28/1/19 8:58 am, Carlos E. R. wrote:
On 27/01/2019 21.04, Dave Howorth wrote:
On Sun, 27 Jan 2019 14:00:15 +0100 "Carlos E. R." <> wrote:
> 4-Why isn't rebuilddb in the rpm manual? It is on another manual. Let me see if I can find it [...] no luck so far [...]
man -K rebuilddb
finds it.
RPMDB(8)
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]
Use --initdb to create a new database if one doesn't already exist (existing database is not overwrit- ten), use --rebuilddb to rebuild the database indices from the installed package headers.
Well, there it is :-)
If you found "rpm --rebuilddb" in some doc, it is old and has not been corrected. It is "rpmdb --rebuilddb". Err, surely you yourself found it. Although it is labelled 'RPMDB(8)' it actually claims 'rpm {--initdb|--rebuilddb} ...'. You are right! It is there.
I think it was previously 'rpm {--initdb|--rebuilddb} ...', and then moved to rpmdb. The documentation was just moved to another man, but not edited.
Bug found!
There's nothing better than creating confusion... :-(.
So, which is it: 'rpm --rebuilddb' or 'rpmdb --rebuilddb'?
The later. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Op donderdag 31 januari 2019 07:46:58 CET schreef Basil Chupin:
On 28/1/19 8:58 am, Carlos E. R. wrote:
On 27/01/2019 21.04, Dave Howorth wrote:
On Sun, 27 Jan 2019 14:00:15 +0100 "Carlos E. R." <> wrote:
> 4-Why isn't rebuilddb in the rpm manual?
It is on another manual. Let me see if I can find it [...] no luck so far [...]
man -K rebuilddb
finds it.
RPMDB(8)
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root
DIRECTORY]
Use --initdb to create a new database if one doesn't already
exist (existing database is not overwrit-
ten), use --rebuilddb to rebuild the database indices from the
installed package headers.
Well, there it is :-)
If you found "rpm --rebuilddb" in some doc, it is old and has not been corrected. It is "rpmdb --rebuilddb".
Err, surely you yourself found it. Although it is labelled 'RPMDB(8)' it actually claims 'rpm {--initdb|--rebuilddb} ...'.
You are right! It is there.
I think it was previously 'rpm {--initdb|--rebuilddb} ...', and then moved to rpmdb. The documentation was just moved to another man, but not edited.
Bug found!
There's nothing better than creating confusion... :-(.
So, which is it: 'rpm --rebuilddb' or 'rpmdb --rebuilddb'?
BC Both work.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Basil Chupin
On 28/1/19 8:58 am, Carlos E. R. wrote:
On 27/01/2019 21.04, Dave Howorth wrote:
On Sun, 27 Jan 2019 14:00:15 +0100 "Carlos E. R." <> wrote:
> 4-Why isn't rebuilddb in the rpm manual? It is on another manual. Let me see if I can find it [...] no luck so far [...]
man -K rebuilddb
finds it.
RPMDB(8)
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]
Use --initdb to create a new database if one doesn't already exist (existing database is not overwrit- ten), use --rebuilddb to rebuild the database indices from the installed package headers.
Well, there it is :-)
If you found "rpm --rebuilddb" in some doc, it is old and has not been corrected. It is "rpmdb --rebuilddb". Err, surely you yourself found it. Although it is labelled 'RPMDB(8)' it actually claims 'rpm {--initdb|--rebuilddb} ...'. You are right! It is there.
I think it was previously 'rpm {--initdb|--rebuilddb} ...', and then moved to rpmdb. The documentation was just moved to another man, but not edited.
Bug found!
There's nothing better than creating confusion... :-(.
So, which is it: 'rpm --rebuilddb' or 'rpmdb --rebuilddb'?
which one works for you? then that is the correct invocation! -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (7)
-
Andrei Borzenkov
-
Basil Chupin
-
Carlos E. R.
-
Dave Howorth
-
Felix Miata
-
Knurpht-openSUSE
-
Patrick Shanahan