zmanda / amanda

Amanda Network Backup
https://www.zmanda.com/downloads/
Other
214 stars 107 forks source link

Only the first backup in disklist is made #222

Closed ndias closed 5 months ago

ndias commented 1 year ago

If I use a disk as tape, every run of amdump will fail after backup the first machine/disk in disklist, with the error

xxxxx:/yyyyy 20230525131104 1 21m dump to tape done xxxxx:/yyyy/zzzz 20230525131104 0 6244m terminated while waiting for dumping

The mail saying

FAIL driver xxxxxx /yyyy/zzzzz 20230525131104 0 [can't do degraded dump without holding disk]

Downgrading to the previous version amanda-3.5.1 this problems will not happen.

The problem do not happens if the tape is a real tape not a disk!

rishabh-trivedi98 commented 1 year ago

Hi @ndias,

I have tried setting up virtual disks manually and using the following configuration (wiki link https://wiki.zmanda.com/index.php/How_To:Set_Up_Virtual_Tapes)

amanda.conf

org "MyConfig"
infofile "/amanda/state/curinfo"
logdir "/amanda/state/log"
indexdir "/amanda/state/index"
dumpuser "amandabackup"

labelstr "MyData[0-9][0-9]"
autolabel "MyData%%" EMPTY VOLUME_ERROR
tapecycle 4
dumpcycle 3 days
amrecover_changer "changer"
tpchanger "chg-disk:/amandatapes/test/mytape"

tapetype "HARD-DISK"
define tapetype HARD-DISK {
    comment "Dump onto hard disk"
    length 3072 mbytes  # specified in mbytes to get the exact size of 3GB
}

define dumptype simple-gnutar-local {
    auth "local"
    compress none
    program "GNUTAR"
}

holdingdisk hd1 {
    directory "/amanda/holding"
    use 50 mbytes
    chunksize 1 mbyte
}

I am able to successfully trigger amdump multiple times. If you are still facing this issue, can you provide the configuration file (amanda.conf) that you are using?

Thank You

ndias commented 1 year ago

The problem is not trigger amdump multiple times, is trigger amdump one time but only one DLE (one entry in the [disklist]) from several is success in making the backup, in other words if I have 10 entries in disklist one ends the backup with success the other 9 will fail. My Conf ... the relevant parts

inparallel 1
dumporder "sssS"
taperalgo first
displayunit "m" netusage 8000 Kbps

5x6=30 TAPES

dumpcycle 6 weeks runspercycle 32 tapecycle 32

bumpsize 20 Mb
bumppercent 20
bumpdays 1 bumpmult 4

etimeout 300 dtimeout 1800
ctimeout 30

device_output_buffer_size 1280k

usetimestamps yes

flush-threshold-dumped 0 flush-threshold-scheduled 0 taperflush 0 autoflush no

runtapes 1

tapedev "chg-disk:/amanda/vtapes"

maxdumpsize -1
tapetype HARDDISK

define tapetype HARDDISK { length 30000 mbytes }

rishabh-trivedi98 commented 1 year ago

Hi @ndias,

I tried integrating the configuration you provided and the following is my configuration file.

org "MyConfig"
infofile "/amanda/state/curinfo"
logdir "/amanda/state/log"
indexdir "/amanda/state/index"
dumpuser "amandabackup"

inparallel 1
dumporder "sssS"
taperalgo first
displayunit "m"
netusage 8000 Kbps

dumpcycle 6 weeks
runspercycle 32
tapecycle 32

bumpsize 20 Mb
bumppercent 20
bumpdays 1
bumpmult 4

etimeout 300
dtimeout 1800
ctimeout 30

device_output_buffer_size 1280k

flush-threshold-dumped 0
flush-threshold-scheduled 0
taperflush 0
autoflush no

labelstr "MyData[0-9][0-9]"
autolabel "MyData%%" EMPTY VOLUME_ERROR
amrecover_changer "changer"
tpchanger "chg-disk:/amandatapes/test/mytape"

runtapes 1

maxdumpsize -1

tapetype "HARD-DISK"
define tapetype HARD-DISK {
    comment "Dump onto hard disk"
    length 3072 mbytes  # specified in mbytes to get the exact size of 3GB
}

define dumptype simple-gnutar-local {
    auth "local"
    compress none
    program "GNUTAR"
}

holdingdisk hd1 {
    directory "/amanda/holding"
    use 50 mbytes
    chunksize 1 mbyte
}

I have 3 entries in disklist and all of them are getting backuped up when I run the amdump command. Is there anything different in here from your configuration?

I am also including my disklist file for reference.

localhost /etc simple-gnutar-local
localhost /tmp simple-gnutar-local
localhost /bin simple-gnutar-local

Thank You

ndias commented 1 year ago

So, after check your configuration @rishabh-trivedi98 , it works now, but from my point of view it still a bug.

The difference is the holdingdisk, I don't have that configuration in my CONF, and in previous version of amanda 3.5.1 is not necessary to have a holdingdisk to have success in making the backups!

Even more if I'm using a physical DISK as Tapes it doesn't make any sense to have a holdingdisk, ok, there are cases that maybe having a holdingdisk make sense, but not in my case, I have only 1 machine, and inparallel = 1 so, why this change in behaver from 3.5.1 to 3.5.3?

rishabh-trivedi98 commented 5 months ago

Thank you for raising this issue. Due to multiple DLE entries, amanda is using degraded mode for the backups. Using a holdingdisk is mandatory in degraded mode.

We are closing this issue as there are no further actions from our side. If you encounter similar issues or have further questions in the future, please feel free to open a new issue.

konidev20 commented 5 months ago

Even more if I'm using a physical DISK as Tapes it doesn't make any sense to have a holdingdisk, ok, there are cases that maybe having a holdingdisk make sense, but not in my case, I have only 1 machine, and inparallel = 1 so, why this change in behaver from 3.5.1 to 3.5.3?

@rishabh-trivedi98 can we review this.

Due to multiple DLE entries, amanda is using degraded mode for the backups. Using a holdingdisk is mandatory in degraded mode.

Is this what has changed between 3.5.3 and 3.5.1?

Let's check this internally again #253 can be used for this.