abracadaniel / cardano-pool-docker

Docker container for setting up and running a Cardano Stake Pool
164 stars 62 forks source link

backups directory does not exist, tar backup fails #43

Closed nopoz closed 2 years ago

nopoz commented 3 years ago

Seeing this in my create_stakepool.<date>.log file:

Creating Stake Pool addresses, keys and certificates, and submits to the blockchain.
staking directory already exists.
Backing up to staking.1635297576.tar.gz.
tar: Removing leading `/' from member names
tar (child): /config/test-ada_producer/backups/staking.1635297576.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: /config/test-ada_producer/backups/staking.1635297576.tar.gz: Cannot write: Broken pipe
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Taking a look at the /config/test-ada_producer/ path there is no "backups" directory. I imagine this would be fixed if the there was a check if the directory exists and if it does not, then create one.

if [[ ! -d $dirname ]]; then
    mkdir $dirname
fi
abracadaniel commented 2 years ago

Hi,

Thanks for letting me know. Its already creating the directory, but I changed it so it creates it absolute instead of relative, hopefully that fixes it. :)