Skip to content

ninja-software/savedbb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

savedbb

Save Database to Backblaze

Requirements

Note

Put b2 in common path so it is accessible e.g. /usr/bin

Installation

Execute as postgres user

  1. Create backup dir
mkdir -p /backups/db
  1. Get script
mkdir ~/bin
cd ~/bin
wget https://raw.githubusercontent.com/ninja-software/savedbb/master/savedbb.sh
chmod +x savedbb.sh
  1. Download, set permission, edit .savedbb.env file
cd ~
wget -O .savedbb.env https://raw.githubusercontent.com/ninja-software/savedbb/master/.savedbb.sample.env
chmod 600 .savedbb.env
nano .savedbb.env
  1. Run as cron job (as postgres user, otherwise need to specify user in pg_dump)
crontab -e

# m h  dom mon dow   command
0 10 * * * . $HOME/.savedbb.env; $HOME/bin/savedbb.sh >> $HOME/bkup.log

About

Postgres Database backup to Backblaze script

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages