Re: garbage collect: free orphaned chunks from disks?

2023-03-09 Thread Jon LaBadie

On Wed, Mar 08, 2023 at 12:20:00PM +0100, Heiko Schlittermann wrote:

Hi,

Jens Berg  (Mi 08 Mär 2023 10:06:34 CET):

She does in the moment a tape (= slot) is re-used.

…

Remember that amanda was initially designed to work with tapes and that


Olivier  (Mi 08 Mär 2023 11:46:37 CET):

While the tape/slot could free the level 1 dumps for a-disk, there could be
some DLE for other disks/hosts that are still valid on that tape/slot.



Yes, I know that amanda was designed for tapes initially (and I'm still
using it happily with tapes.).

The "disk garbage collection" was just a minor issue I found when
checking what space is available on one of our disk based backup
servers.

Thanks for the input.


Thinking outside of amanda provided tools:

1. Assuming tar is your backup program, the "garbage" files do still
   contain recoverable data.  I did make use of this "once" to recover
   a file deleted just before that oldest full dump.

2. The files on vtapes are named such that a find(1) command could be
   constructed to scan the backup disks looking for the "garbage" files
   (they would be "older" than the oldest full dump) and either list
   them or delete them.

jl

--
Jon H. LaBadie j...@labadie.us
 154 Milkweed Dr (540) 868-8052 (H)
 Lake Frederick, VA 22630(703) 935-6720 (M)



Re: garbage collect: free orphaned chunks from disks?

2023-03-08 Thread Exuvo

I would also like to add that it is good to have backups from varying dates 
around in case the most recent backup is ex after a file was accidentally 
deleted and you need to restore it from an older backup.

Anton "exuvo" Olsson
   ex...@exuvo.se

On 2023-03-08 12:20, Heiko Schlittermann wrote:

Hi,

Jens Berg  (Mi 08 Mär 2023 10:06:34 CET):

She does in the moment a tape (= slot) is re-used.

…

Remember that amanda was initially designed to work with tapes and that

Olivier  (Mi 08 Mär 2023 11:46:37 CET):

While the tape/slot could free the level 1 dumps for a-disk, there could be
some DLE for other disks/hosts that are still valid on that tape/slot.


Yes, I know that amanda was designed for tapes initially (and I'm still
using it happily with tapes.).

The "disk garbage collection" was just a minor issue I found when
checking what space is available on one of our disk based backup
servers.

Thanks for the input.


Re: garbage collect: free orphaned chunks from disks?

2023-03-08 Thread Heiko Schlittermann
Hi,

Jens Berg  (Mi 08 Mär 2023 10:06:34 CET):
> She does in the moment a tape (= slot) is re-used.
…
> Remember that amanda was initially designed to work with tapes and that

Olivier  (Mi 08 Mär 2023 11:46:37 CET):
> While the tape/slot could free the level 1 dumps for a-disk, there could be
> some DLE for other disks/hosts that are still valid on that tape/slot.


Yes, I know that amanda was designed for tapes initially (and I'm still
using it happily with tapes.).

The "disk garbage collection" was just a minor issue I found when
checking what space is available on one of our disk based backup
servers.

Thanks for the input.
-- 
Heiko


signature.asc
Description: PGP signature


Re: garbage collect: free orphaned chunks from disks?

2023-03-08 Thread Olivier
Hi,

> Given a series of dumps like
>
> a-host a-disk 1 1 1 0 1 1
>
> the left most level 1 dumps are worthless, because we already dropped
> the "base" level 0.

While the tape/slot could free the level 1 dumps for a-disk, there could be
some DLE for other disks/hosts that are still valid on that tape/slot.

I don't think Amanda has any way to free some specific DLE from a
tape/slot. It is only at the tape/slot level that a tape/slot can be
erased and reused.

Best regards,

Olivier


Re: garbage collect: free orphaned chunks from disks?

2023-03-08 Thread Jens Berg

On 08.03.2023 08:14, Heiko Schlittermann wrote:

- Does amanda delete these files? From the output of `amadmin find` it
   does not look as if it does.

She does in the moment a tape (= slot) is re-used.
Remember that amanda was initially designed to work with tapes and that 
using disks as backup media has been implemented by emulating a 
classical tape library. With real tapes it would be an extremely costly 
operation to fetch and (partially) overwrite all older backups of a DLE 
once a level 0 has been written. Sure, if amanda knew she was operating 
on disks rather than on tapes she could do so easily. But what would be 
the benefit?


garbage collect: free orphaned chunks from disks?

2023-03-07 Thread Heiko Schlittermann
Hi,

if I understand and observed well, then for a disk based backup we have the 
chunks as
single files in the slot* directories.

Given a series of dumps like

a-host a-disk 1 1 1 0 1 1

the left most level 1 dumps are worthless, because we already dropped
the "base" level 0.

- Does amanda delete these files? From the output of `amadmin find` it
  does not look as if it does.
- Is there any pre-existing tool / procedure to do so?
  - If not: 
- Would this be useful?
- Where would you look for it?
- Where would it fit best (amtape? amadmin? amcleanup?)

Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
 SCHLITTERMANN.de  internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --- key ID: F69376CE -


signature.asc
Description: PGP signature