Skip to content

Instantly share code, notes, and snippets.

View andy-1983's full-sized avatar

ANDREY NURULIN andy-1983

View GitHub Profile
@andy-1983
andy-1983 / 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