pelican-dev / wings

MIT License
131 stars 19 forks source link

S3 backup error #26

Closed clabeuhtegrite closed 2 months ago

clabeuhtegrite commented 3 months ago

Current Behavior When i copy/paste my s3 config from ptero, i have the error in the paste. All argument are good in the pelican doc.

My config is the follow :

APP_BACKUP_DRIVER=s3 AWS_DEFAULT_REGION='auto' AWS_ACCESS_KEY_ID='XXXXX' AWS_SECRET_ACCESS_KEY='XXXXXXXXXX' AWS_BACKUPS_BUCKET='pelican-backups' AWS_ENDPOINT='https://xxxxx.r2.cloudflarestorage.com/' AWS_SIGNATURE_VERSION='4' (TRIED WITH A #) AWS_USE_PATH_STYLE_ENDPOINT=true BACKUP_MAX_PART_SIZE=19737000

Expected Behavior The backup colmplete successfuly.

Steps to Reproduce Copy/paste a valid config s3 from ptero.

Panel Version Beta5

Wings Version Beta3

Wings error log:

INFO: [Jun 11 16:47:38.138] creating backup for server adapter=s3 backup=757f738f-51fe-49ce-8bce-394340fb432e path=/var/lib/pelican/backups/8081785f-550e-4a23-8445-5dc202f66479/757f738f-51fe-49ce-8bce-394340fb432e.tar.gz request_id=2d2ac735-45ca-4fda-963d-59c8e49e3df1 server=8081785f-550e-4a23-8445-5dc202f66479 INFO: [Jun 11 16:47:38.431] notified panel of failed backup state backup=757f738f-51fe-49ce-8bce-394340fb432e server=8081785f-550e-4a23-8445-5dc202f66479 ERROR: [Jun 11 16:47:38.431] router: failed to generate server backup error=backup: error while generating server backup: open /var/lib/pelican/backups/8081785f-550e-4a23-8445-5dc202f66479/757f738f-51fe-49ce-8bce-394340fb432e.tar.gz: no such file or directory request_id=2d2ac735-45ca-4fda-963d-59c8e49e3df1 server_id=8081785f-550e-4a23-8445-5dc202f66479

Stacktrace: open /var/lib/pelican/backups/8081785f-550e-4a23-8445-5dc202f66479/757f738f-51fe-49ce-8bce-394340fb432e.tar.gz: no such file or directory backup: error while generating server backup github.com/pelican-dev/wings/server.(*Server).Backup github.com/pelican-dev/wings/server/backup.go:89 github.com/pelican-dev/wings/router.postServerBackup.func1 github.com/pelican-dev/wings/router/router_server_backup.go:51 runtime.goexit runtime/asm_amd64.s:1650

iamkubi commented 3 months ago

Ah yes, I think right now the parent directory is only created by the local backup driver. This probably worked for me in testing because I created the directory with a local backup and then switched to test that S3 backups worked.