Skip to content

Instantly share code, notes, and snippets.

@andy-1983
andy-1983 / do_archive.sh
Created Jan 26, 2021
PSQL archiving script
View do_archive.sh
#!/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