zmanda / amanda

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

SignatureDoesNotMatch Error While Uploading to Amazon S3 #256

Open kdpeiris opened 5 months ago

kdpeiris commented 5 months ago

I installed Amanda version 3.5.4 & used below amanda.conf to upload backup to Amazon S3. But it doesn't upload to S3 & stored in holdingdisk. When I was checking taper logs, I was able to see this error "Sun Jun 09 18:44:08.563173361 2024: pid 487304: thd-0x5654ab95c400: taper: PUT https://artifactory-backup12345.s3.amazonaws.com/slot-02special-tapestart failed with 403/SignatureDoesNotMatch Sun Jun 09 18:44:08.563223095 2024: pid 487304: thd-0x5654ab95c400: taper: Device s3:artifactory-backup12345/slot-02 error = 'While writing amanda header: The request signature we calculated does not match the signature you provided. Check your key and signing method. (SignatureDoesNotMatch) (HTTP 403)' Sun Jun 09 18:44:08.563256703 2024: pid 487304: thd-0x5654ab95c400: taper: Device s3:artifactory-backup12345/slot-02 setting status flag(s): DEVICE_STATUS_DEVICE_ERROR, and DEVICE_STATUS_VOLUME_ERROR" How can I fix this?

amanda.conf

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

tapecycle 3 dumpcycle 3 days amrecover_changer "changer" tapedev "my_S3"

tapetype S3 define tapetype S3 { comment "S3 pseudo-tape" length 10000 mbytes }

define changer my_S3 { tpchanger "chg-multi:s3:artifactory-backup12345/slot-{01,02,03}"

amazonaws S3

device_property "S3_ACCESS_KEY" "XXXXXXXXXXXX"                # Your S3 Access Key
device_property "S3_SECRET_KEY" "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"  # Your S3 Secret Key
device_property "S3_BUCKET_LOCATION" "us-east-1"
device_property "S3_SSL" "YES"

}

holdingdisk hd1{ comment "main holding disk" directory "/amanda/holding" use -100 Mb chunksize 1Gb }

define dumptype global { comment "Global definitions" auth "local" }

define dumptype normal { global program "GNUTAR" compress none }`

`amandabackup@amanda:/etc/amanda/MyConfig$ amcheck MyConfig Amanda Tape Server Host Check

NOTE: Holding disk '/amanda/holding': 48218112 KB disk space available, using 48115712 KB slot 2: volume 'MyData2' Will write to volume 'MyData2' in slot 2. NOTE: skipping tape-writable test Server check took 0.170 seconds Amanda Backup Client Hosts Check

Client check: 1 host checked in 2.207 seconds. 0 problems found. (brought to you by Amanda 3.5.4.git.0da4f0ee) amandabackup@amanda:/etc/amanda/MyConfig$ amdump MyConfig amandabackup@amanda:/etc/amanda/MyConfig$ echo $? 16 amandabackup@amanda:/etc/amanda/MyConfig$ amreport MyConfig Hostname: amanda.abc.io Org : MyConfig Config : MyConfig Date : June 9, 2024

Not using all tapes because taper found no tape. There are 4000K of dumps left in the holding disk. Run amflush to flush them to tape. The next tape Amanda expects to use is: MyData2.

STATISTICS: Total Full Incr. Level:#


Estimate Time (hrs:min) 0:00 Run Time (hrs:min) 0:00 Dump Time (hrs:min) 0:00 0:00 0:00 Output Size (meg) 0.3 0.0 0.3 Original Size (meg) 0.3 0.0 0.3 Avg Compressed Size (%) 100.0 -- 100.0 DLEs Dumped 1 0 1 1:1 Avg Dump Rate (k/s) 252.1 -- 252.1

Tape Time (hrs:min) 0:00 0:00 0:00 Tape Size (meg) 0.0 0.0 0.0 Tape Used (%) 0.0 0.0 0.0 DLEs Taped 0 0 0 Parts Taped 0 0 0 Avg Tp Write Rate (k/s) -- -- --

NOTES: planner: tapecycle (2) <= runspercycle (3) taper: Slot 2 with label MyData2 is usable taper: while labeling new volume: Success taper: tape MyData2 Barcode kb 0 fm -1 [OK]

DUMP SUMMARY: DUMPER STATS TAPER STATS HOSTNAME DISK L ORIG-KB OUT-KB COMP% MMM:SS KB/s MMM:SS KB/s


localhost /etc 1 270 270 -- 0:01 252.1

(brought to you by Amanda version 3.5.4.git.0da4f0ee)`

konidev20 commented 5 months ago

This usually happens when there is an AccessKeyID and SecretAccessKey mismatch.

kdpeiris commented 5 months ago

I checked it using awscli & able to access S3 bucket. So there is no mismatch with AccessKeyID & SecretAccessKey.