Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
It's not super bad that these are there, but they do increase the
database size a fair bit considering that they are actually just full of
NULL values.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Migrations may remove data and it doesn't hurt to vacuum afterwards to
reduce the file size.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This is related to 62f5bc3ce90fedb396d103caae68dc2f211f1b16 and would
trigger if the optimization prevents a path from being added to the
database.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Should have been part of f0dd3fd59afac321317d3b52a36d179b4ea504f7. Oops.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
previous path for top level paths
Same issue as 62f5bc3ce90fedb396d103caae68dc2f211f1b16 except that this
time it is the for top level paths (`/lib` and `/lib64`) which are
handled outside the loop.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
previous path
Files that share a common substring (e.g. `/home/foo/.ssh/id_rsa` and
`/home/foo/.ssh/id_rsa.pub`) could incorrectly trigger an optimization
that was only supposed to be triggered if the first path is a directory.
The first path would then not be added to the database cache even though
it should have been.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Better code readability than with the full name.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
We no longer need a special whitelist for archive names since the
database no longer uses them as column keys. We still need to untaint
variables that are passed to DBI so we use untaint() for this now. We
also move the location of the untaint call closer to its usage with
DBI/system() to prevent untainted data from leaking elsewhere.
Fixes #4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Having the backup archive names in the table columns is not strictly
necessary. Replace this with numeric IDs and map them via the `archives`
table so that we can eventually remove untaint_archive_name().
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Empty here means that the DB does not contain any backup archive
information because all information that is already in the db has to be
removed. The old code tries to copy existing data into the new table,
but since there are no archives to copy data for, the sql query fails.
Also, it would copy all rows and only populate the path column, but if
there are no archives that have timestamps, that's actually useless
work.
This patch ensures that the table is kept empty if there are no
archives.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Also instantly deprecate the option since it is only a short term fix in
case someone notices problems with the new code.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
removing an item from the stack
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This cuts execution time on my workstation from about 85 seconds for an
--update-cache adding one archive to roughly 62 seconds. Measured
totally unscientifically by simply running the full application instead
of isolating the code, but it makes sense that regexes are slower so
I'll take it.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
The original performance problem on my machine doesn't seem to be
reproducable any more so maybe either sqlite got smarter or it was
something else entirely. Move the warning to DEBUG and soften the
documentation. If it still helps people can use it, but we don't have to
annoy them if it doesn't.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
While not all operations fill the cache, --list does. However, for read
operations it doesn't actually appear to help performance. Limit the
large cache setting to update operations only because there it does
really increase performance.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
The previous code didn't support borg 1.1 properly and the cached might
now be broken.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
The rest of the code expects the mtime format, but borg <1.1 mixed up
the formats between isomtime and mtime.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|