Skip to content

Instantly share code, notes, and snippets.

View UncleStephenCode's full-sized avatar

uncle Stephen UncleStephenCode

View GitHub Profile
@UncleStephenCode
UncleStephenCode / do_archive.sh
Created January 26, 2021 08:12
PSQL archiving script
#!/bin/bash
STARTSCRIPT=$(date +%s)
STOPSCRIPT=''
ListOfBases='dblist'
PORT='5432'
USERNAME='root'
SERVERNAME='localhost'
ARCHIVEDIR='/archive_dir'
MAXDBCOUNT='1000' #count of db names to select from cluster