This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
quick:shellscript [2024/10/21 09:12] bbarsch removed |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | # Shell Scripts | ||
| - | < | ||
| - | [ischeepers@dirisa-dbsvr ~]$ sudo cat / | ||
| - | #!/bin/bash | ||
| - | |||
| - | |||
| - | DOM=$( date " | ||
| - | MONTH=$( date " | ||
| - | YEAR=$( date " | ||
| - | PREVMONTH=$( date --date=' | ||
| - | |||
| - | BACKUPDIR=/ | ||
| - | FILE=$BACKUPDIR/ | ||
| - | |||
| - | if [ " | ||
| - | LASTFILE=$( ls -tr / | ||
| - | echo cp -p $BACKUPDIR/ | ||
| - | fi | ||
| - | |||
| - | pg_dump --host=localhost -w --username=chpc chpcusers | bzip2 > / | ||
| - | |||
| - | </ | ||