Re: amvault hangs

2022-11-25 Thread Christian
The tool is not optimal but from what I understand its purpose exactly 
matches my use case, and it had worked before. It's just that it broke 
at some point (or maybe I broke it somehow?)


I've read through the thread you suggested. Thanks for pointing that 
out. However, it doesn't seem to fit my need here.


What I'm trying to achieve is that amvault takes what it has in holding 
and writes that out to my diskchanger. After that, I want it to do 
exactly the same once again (same config, same data, same storage) with 
me physically changing the diskchangers of course in between. In the 
end, I'll have two copies of the same set of tapes on two different 
physical devices. The idea is to store them in different physical locations.


I could theoretically get the same result using amflush but can I make 
amflush *NOT* delete the data from holding after flushing in the first run?


I'm running amanda on Ubuntu 18.04.

amanda.conf:

---
org "archive"
infofile "/amanda/archive/state/curinfo"
logdir "/amanda/archive/state/log"
indexdir "/amanda/archive/state/index"
dumpuser "backup"

labelstr "archive-[0-9][0-9][0-9][0-9]"
autolabel "$c-" EMPTY VOLUME_ERROR
meta-autolabel "$c-%%%"
tapecycle 301
dumpcycle 0
runtapes 300

flush-threshold-dumped 100
flush-threshold-scheduled 100
taperflush 100
autoflush yes

debug-taper 9
debug-auth 9
debug-chunker 9
debug-driver 9
debug-dumper 9
debug-event 9
debug-holding 9
debug-planner 9
debug-protocol 9
debug-recovery 9

reserve 10

tapetype HD500G
define tapetype HD500G {
    length 500G
    }

define application-tool app_amgtar {
    plugin "amgtar"
    property "CHECK-DEVICE" "NO"
    property "ONE-FILE-SYSTEM" "NO"
}

define dumptype nas {
    auth "local"
    compress none
    index yes
    record no
    strategy noinc
    skip-incr yes
    program "APPLICATION"
    application "app_amgtar"
    encrypt server
    server_encrypt "/usr/sbin/amcrypt"
    server_decrypt_option "-d"
}

holdingdisk hd1 {
    directory "/path/to/holding/archive"
    chunksize 50 mbyte
}

define changer removable-disk {
    tpchanger "chg-disk:/diskchanger"
    property "NUM-SLOT" "1"
    property "AUTO-CREATE-SLOT" "no"
    property "REMOVABLE" "yes"
    property "MOUNT" "yes"
    property "UMOUNT" "yes"
    property "UMOUNT-LOCKFILE" "/etc/amanda/archive/disk.lock"
    property "UMOUNT-DELAY" "1"
}

tpchanger "removable-disk"

define storage archive {
    tapedev "removable-disk"
    tpchanger "removable-disk"
}
---

To backup to holding, I run

    amdump archive

For vaulting to tape, I run

    amvault --dest-storage archive archive 
    grep -v no-reuse /etc/amanda/archive/tapelist | cut -d" " -f 2 | 
xargs -n 1 amadmin archive no-reuse


Finally, when I'm done with vaulting, I clean up holding by running

    amadmin archive holding list | xargs -n 1 amadmin archive holding 
delete


On 24.11.2022 10:22, Stefan G. Weichinger wrote:


Unfortunately I can't help with amvault. I never was successful or 
happy with that tool.


In general I suggest you tell us more about which OS you use amanda 
with and something about your amanda configuration.


I went for defining multiple storages in amanda.conf.

Maybe useful for you as well.

Check the thread "Multiple storage-definitions, generating archive 
tapes" if interested.




Re: amvault hangs

2022-11-24 Thread Stefan G. Weichinger

Am 22.11.22 um 17:13 schrieb Christian:

Hello,

I'm running a very small amanda installation to create regular backups 
of local files and also involves archiving at some point. For archiving 
files, I run a full backup that ends up in holding and then I run 
amvault twice to write the backup set to two different disk changers. 
Finally, I set no-reuse on the created media and delete the backup from 
holding.


However, for quite some time now, amvault does not work anymore. I 
believe it was after the upgrade to 3.5.1 that it stopped working.


Unfortunately I can't help with amvault. I never was successful or happy 
with that tool.


In general I suggest you tell us more about which OS you use amanda with 
and something about your amanda configuration.


I went for defining multiple storages in amanda.conf.

Maybe useful for you as well.

Check the thread "Multiple storage-definitions, generating archive 
tapes" if interested.




amvault hangs

2022-11-22 Thread Christian



Hello,

I'm running a very small amanda installation to create regular backups 
of local files and also involves archiving at some point. For archiving 
files, I run a full backup that ends up in holding and then I run 
amvault twice to write the backup set to two different disk changers. 
Finally, I set no-reuse on the created media and delete the backup from 
holding.


However, for quite some time now, amvault does not work anymore. I 
believe it was after the upgrade to 3.5.1 that it stopped working.


amvault hangs at:

"Reading 
'/nfs/Daten/.amanda/holding/archive/20221122112256/localhost._etc.0': 
FILE: date 20221122112256 host localhost disk /etc lev 0 comp N program 
APPLICATION crypt enc server_encrypt /usr/sbin/amcrypt 
server_decrypt_option -d"


amvault debug output below.

Backup and restore work just fine as well as reading from and writing to 
the diskchanger.

Any ideas what else I could check?

$ cat amvault.20221122155617.debug
Tue Nov 22 15:56:17.725618208 2022: pid 766: thd-0x556fc692c000: 
amvault: pid 766 ruid 34 euid 34 version 3.5.1: start at Tue Nov 22 
15:56:17 2022
Tue Nov 22 15:56:17.725705654 2022: pid 766: thd-0x556fc692c000: 
amvault: Arguments: --dest-storage archive archive localhost /etc 
20221122112256
Tue Nov 22 15:56:17.726486391 2022: pid 766: thd-0x556fc692c000: 
amvault: reading config file /etc/amanda/archive/amanda.conf
Tue Nov 22 15:56:17.729550131 2022: pid 766: thd-0x556fc692c000: 
amvault: pid 766 ruid 34 euid 34 version 3.5.1: rename at Tue Nov 22 
15:56:17 2022
Tue Nov 22 15:56:17.730812990 2022: pid 766: thd-0x556fc692c000: 
amvault: 
/usr/lib/x86_64-linux-gnu/amanda/perl/Amanda/Vault.pm:218:info:251 
The amdump log file is '/amanda/archive/state/log/amdump.20221122155617'
Tue Nov 22 15:56:17.731009586 2022: pid 766: thd-0x556fc692c000: 
amvault: 
/usr/lib/x86_64-linux-gnu/amanda/perl/Amanda/Vault.pm:224:info:250 
The trace log file is '/amanda/archive/state/log/log.20221122155617.0'
Tue Nov 22 15:56:17.731288444 2022: pid 766: thd-0x556fc692c000: 
amvault: event: loop: enter: nonblockg=0, eh=(nil)
Tue Nov 22 15:56:17.744031927 2022: pid 766: thd-0x556fc692c000: 
amvault: chg-disk: Dir /diskchanger
Tue Nov 22 15:56:17.744058652 2022: pid 766: thd-0x556fc692c000: 
amvault: chg-disk: Using statefile '/diskchanger/state'
Tue Nov 22 15:56:21.386868157 2022: pid 766: thd-0x556fc692c000: 
amvault: chg-disk: Dir /diskchanger
Tue Nov 22 15:56:21.386898125 2022: pid 766: thd-0x556fc692c000: 
amvault: chg-disk: Using statefile '/diskchanger/state'
Tue Nov 22 15:56:21.395246165 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scribe: starting
Tue Nov 22 15:56:21.396022194 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scan::traditional stage 1: search for oldest 
reusable volume
Tue Nov 22 15:56:21.396094535 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scan::traditional no oldest reusable volume
Tue Nov 22 15:56:21.396211695 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scan::traditional stage 2: scan for any reusable 
volume
Tue Nov 22 15:56:21.397554166 2022: pid 766: thd-0x556fc692c000: 
amvault: dir_name: /diskchanger/slot3/
Tue Nov 22 15:56:21.398814689 2022: pid 766: thd-0x556fc692c000: 
amvault: Slot 3 with label archive-0019 is usable
Tue Nov 22 15:56:21.398878953 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scan::traditional result: 'archive-0019' on 
file:/diskchanger/slot3 slot 3, mode 2
Tue Nov 22 15:56:21.400791345 2022: pid 766: thd-0x556fc692c000: 
amvault: 
/usr/lib/x86_64-linux-gnu/amanda/perl/Amanda/Vault.pm:1196:info:2500017 
Reading 
'/nfs/Daten/.amanda/holding/archive/20221122112256/localhost._etc.0': 
FILE: date 20221122112256 host localhost disk /etc lev 0 comp N program 
APPLICATION crypt enc server_encrypt /usr/sbin/amcrypt 
server_decrypt_option -d
Tue Nov 22 15:56:21.401162236 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Recovery::Clerk: successfully located holding file for 
recovery
Tue Nov 22 15:56:21.401313530 2022: pid 766: thd-0x556fc692c000: 
amvault: start_recovery called
Tue Nov 22 15:56:21.402874620 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scribe preparing to write, part size 0, using 
LEOM detection (no caching) (splitter)  (LEOM supported)
Tue Nov 22 15:56:21.403502114 2022: pid 766: thd-0x556fc692c000: 
amvault: Starting ( -> 
)>
Tue Nov 22 15:56:21.403531842 2022: pid 766: thd-0x556fc692c000: 
amvault: Final linkage:  -(MEM_RING)-> 

Tue Nov 22 15:56:21.403653339 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Recovery::Clerk: starting recovery
Tue Nov 22 15:56:21.403925478 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scribe: trying to start part
Tue Nov 22 15:56:21.404001144 2022: pid 766: thd-0x556fc692c000: 
amvault: Amanda::Taper::Scribe: got new volume; writing new label
Tue Nov 22 15:56:21.404220438 2022: pid 766: thd-0x556fc692c000: 
amvault: XDTS: use_device(file:/diskchange

Re: Amvault hangs while trying to vault backups from holding disk.

2021-10-11 Thread Winston Sorfleet
I do the same as you for amvault command line invocation i.e.
--latest-fulls --dest-storage.  However I am vaulting from the vtl
directories only, not the holding disk.  Without some details on your
amanda.conf I don't know if that's part of the problem but you appear to
never get to loading a (vtl) slot to read /from/.

My output goes like this:


Sat Oct 09 13:00:43.952721726 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Taper::Scan::traditional stage 1: search for oldest
reusable volume
Sat Oct 09 13:00:43.957348285 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Taper::Scan::traditional oldest reusable volume is
'Vault-1'
Sat Oct 09 13:00:43.957795520 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Taper::Scan::traditional changer is not
fast-searchable; skipping to stage 2
Sat Oct 09 13:00:43.958013506 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Taper::Scan::traditional stage 2: scan for any reusable
volume
Sat Oct 09 13:00:43.958171915 2021: pid 4031574: thd-0x558e5a458a00:
amvault: warning: "/dev/nst0" uses deprecated device naming convention;
using "tape:/dev/nst0" instead.

Sat Oct 09 13:00:43.960571475 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Device is in fixed block size of 32768
Sat Oct 09 13:00:43.965927459 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Slot 1 with label Vault-7 is usable
Sat Oct 09 13:00:43.966108460 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Taper::Scan::traditional result: 'Vault-7' on /dev/nst0
slot 1, mode 2
Sat Oct 09 13:00:43.966999371 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Recovery::Clerk: loading volume 'vtl1'
Sat Oct 09 13:00:43.96703 2021: pid 4031574: thd-0x558e5a458a00:
amvault: find_volume labeled 'vtl1'
Sat Oct 09 13:00:44.591343047 2021: pid 4031574: thd-0x558e5a458a00:
amvault: parse_inventory: load slot 1 with label 'vtl1'
Sat Oct 09 13:00:44.591609582 2021: pid 4031574: thd-0x558e5a458a00:
amvault:
/usr/lib/x86_64-linux-gnu/amanda/perl/Amanda/Recovery/Scan.pm:307:info:120
slot 1
Sat Oct 09 13:00:44.597276267 2021: pid 4031574: thd-0x558e5a458a00:
amvault: dir_name: /amandatapes/slot1/
Sat Oct 09 13:00:44.656621198 2021: pid 4031574: thd-0x558e5a458a00:
amvault:
/usr/lib/x86_64-linux-gnu/amanda/perl/Amanda/Recovery/Scan.pm:459:info:121
vtl1
Sat Oct 09 13:00:44.664182154 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Recovery::Clerk: successfully located first part for
recovery
Sat Oct 09 13:00:44.664832388 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Amanda::Taper::Scribe preparing to write, part size 0, using
LEOM detection (no caching) (splitter)  (LEOM supported)
Sat Oct 09 13:00:44.665859394 2021: pid 4031574: thd-0x558e5a458a00:
amvault: Starting  ->
)>



On 2021-10-11 6:51 a.m., Rami Lehti wrote:
> Hi all,
>
> I have a setup where I have a holding disk and vtapes. Then I try to use
> amvault to copy the latest full backups to tape.
> This works if I use amvault's --fulls-only with --src-storage parameter
> and use the vtapes as the source.
> But if I try to vault backups that are still on the holding disk by
> using --latest-fulls. Amvault tries to copy the first full to tape but
> hangs indefinitely.
>
> The full redacted command line is
> sudo -u backup amvault --dest-storage tapelibrary --latest-fulls backupset
>
> Here's the relevant part of the redacted log file.
>
> ma loka 11 09:23:13.626028751 2021: pid 1126324: thd-0x562b5502a400:
> amvault: Amanda::Taper::Scan::traditional result: 'redacted-vault-1014'
> on tape:/dev/nst0 slot 8, mode 2
> ma loka 11 09:23:13.627741696 2021: pid 1126324: thd-0x562b5502a400:
> amvault:
> /usr/lib/x86_64-linux-gnu/amanda/perl/Amanda/Vault.pm:1196:info:2500017
> Reading '/backup/amanda/holding/20211004180502/._.0': FILE:
> date 20211004180502 host  disk / lev 0 comp .gz program
> /bin/tar crypt enc client_encrypt /usr/sbin/amcrypt-ossl
> client_decrypt_option -d
> ma loka 11 09:23:13.627958672 2021: pid 1126324: thd-0x562b5502a400:
> amvault: Amanda::Recovery::Clerk: successfully located holding file for
> recovery
> ma loka 11 09:23:13.628001640 2021: pid 1126324: thd-0x562b5502a400:
> amvault: start_recovery called
> ma loka 11 09:23:13.628634814 2021: pid 1126324: thd-0x562b5502a400:
> amvault: Amanda::Taper::Scribe preparing to write, part size 0, using
> LEOM detection (no caching) (splitter)  (LEOM supported)
> ma loka 11 09:23:13.639842536 2021: pid 1126324: thd-0x562b5502a400:
> amvault: Starting  ( ->
> )>
> ma loka 11 09:23:13.639865559 2021: pid 1126324: thd-0x562b5502a400:
> amvault: Final linkage:  -(MEM_RING)->
> 
> ma loka 11 09:23:13.639986931 2021: pid 1126324: thd-0x562b5502a400:
> amvault: Amanda::Recovery::Clerk: starting recovery
> ma loka 11 09:23:13.641060521 2021: pid 1126324: thd-0x562b5502a400:
> amvault: start_recovery called
>
> And then nothing.
>
> Is this a bug or am I doing something wrong?
>
> Kind regards,
> Rami Lehti
>



Amvault hangs while trying to vault backups from holding disk.

2021-10-11 Thread Rami Lehti
Hi all,

I have a setup where I have a holding disk and vtapes. Then I try to use
amvault to copy the latest full backups to tape.
This works if I use amvault's --fulls-only with --src-storage parameter
and use the vtapes as the source.
But if I try to vault backups that are still on the holding disk by
using --latest-fulls. Amvault tries to copy the first full to tape but
hangs indefinitely.

The full redacted command line is
sudo -u backup amvault --dest-storage tapelibrary --latest-fulls backupset

Here's the relevant part of the redacted log file.

ma loka 11 09:23:13.626028751 2021: pid 1126324: thd-0x562b5502a400:
amvault: Amanda::Taper::Scan::traditional result: 'redacted-vault-1014'
on tape:/dev/nst0 slot 8, mode 2
ma loka 11 09:23:13.627741696 2021: pid 1126324: thd-0x562b5502a400:
amvault:
/usr/lib/x86_64-linux-gnu/amanda/perl/Amanda/Vault.pm:1196:info:2500017
Reading '/backup/amanda/holding/20211004180502/._.0': FILE:
date 20211004180502 host  disk / lev 0 comp .gz program
/bin/tar crypt enc client_encrypt /usr/sbin/amcrypt-ossl
client_decrypt_option -d
ma loka 11 09:23:13.627958672 2021: pid 1126324: thd-0x562b5502a400:
amvault: Amanda::Recovery::Clerk: successfully located holding file for
recovery
ma loka 11 09:23:13.628001640 2021: pid 1126324: thd-0x562b5502a400:
amvault: start_recovery called
ma loka 11 09:23:13.628634814 2021: pid 1126324: thd-0x562b5502a400:
amvault: Amanda::Taper::Scribe preparing to write, part size 0, using
LEOM detection (no caching) (splitter)  (LEOM supported)
ma loka 11 09:23:13.639842536 2021: pid 1126324: thd-0x562b5502a400:
amvault: Starting  ->
)>
ma loka 11 09:23:13.639865559 2021: pid 1126324: thd-0x562b5502a400:
amvault: Final linkage:  -(MEM_RING)->

ma loka 11 09:23:13.639986931 2021: pid 1126324: thd-0x562b5502a400:
amvault: Amanda::Recovery::Clerk: starting recovery
ma loka 11 09:23:13.641060521 2021: pid 1126324: thd-0x562b5502a400:
amvault: start_recovery called

And then nothing.

Is this a bug or am I doing something wrong?

Kind regards,
Rami Lehti