-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/UniversityRadioYork/ury-bac…
…kups into main
- Loading branch information
Showing
22 changed files
with
128 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
yeah, this can get written | ||
# URY's Server Backups | ||
|
||
## `urysteve` (primary filestore) | ||
- `backup_dbs.sh` - run daily, takes SQL dumps of our databses, and rsyncs them to `stratford` and `moyles` | ||
- `backups-hourly.sh` - runs hourly, sends all the `filestore` and `musicstore` snapshots to `stratford` and `moyles` | ||
- `sanoid` runs to snapshot the `filestore` and `musicstore` | ||
|
||
## `urybackup0` (on-site backup server) | ||
## RIP | ||
- `sanoid` runs to prune old `filestore`/`musicstore` snapshots, and to snapshot `pool0` | ||
- `rsync-daily.new.sh` runs to backup all the other servers we have, i.e. home directories. these are backed up to `pool0` | ||
|
||
## `stratford` (on-site backup server) | ||
- `sanoid` runs to prune old `filestore`/`musicstore` snapshots, and to snapshot `backup/servers` | ||
TODO: | ||
- `rsync-daily.new.sh` | ||
- `backup-alerts.sh` | ||
|
||
## `moyles` (offsite backup server) | ||
- `sanoid` runs to prune old `filestore`/`musicstore`/`pool0` snapshots | ||
TODO - add `rsync-daily.new.sh` to get moyles backups to be independent of on site backups, and also change the sanid config as needed (i.e. copy stratford) | ||
|
||
**Both `urybackup0` and `moyles` run `backup-alerts.sh` daily to send any important information to us in Slack, such as:** | ||
- missing snapshots | ||
- ZFS pools not being OK | ||
- running out of storage space | ||
|
||
|
||
## `uryrrod` (studio webcam recording server) | ||
- `movempg.sh` transfers recorded footage to the `filestore`, where `urysteve` will also tidy up older recordings (older than 90 days) | ||
|
||
## TODO | ||
- mailbox backups - other than just the `ury` server backup | ||
- external monitoring of `backup-alerts.sh` script actually running | ||
|
||
and we desperately need some monitoring scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[backup] | ||
autosnap = no | ||
[backup/servers] | ||
use_template = production | ||
recursive = yes | ||
hourly = 0 | ||
[backup/db] | ||
use_template = production | ||
hourly = 0 | ||
[filestore] | ||
use_template = production | ||
recursive = yes | ||
autosnap = no | ||
[musicstore] | ||
use_template = production | ||
autosnap = no | ||
|
||
[template_production] | ||
frequently = 0 | ||
hourly = 24 | ||
daily = 30 | ||
monthly = 6 | ||
yearly = 0 | ||
autosnap = yes | ||
autoprune = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Move the webcam footage over to the filestore | ||
0 */6 * * * root /home/motion/movempg.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd /home/motion | ||
rsync -a --remove-sent-files --files-from=<(find . -mtime +8m -name "*.mpg") . urysteve.ury:/filestore/Webcams |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
LOG=/var/log/replication.log | ||
|
||
onsite () { | ||
echo "`date` - syncing music-backup0" | tee -a $LOG | ||
/usr/sbin/syncoid -r --no-sync-snap --sshkey="/usr/local/share/backup/steve-bup0-rsa" music [email protected]:music | tee -a $LOG 2>&1 | ||
echo "`date` - syncing filestore-backup0..." | tee -a $LOG | ||
/usr/sbin/syncoid -r --no-sync-snap --sshkey="/usr/local/share/backup/steve-bup0-rsa" filestore [email protected]:pool1 | tee -a $LOG 2>&1 | ||
} | ||
/usr/sbin/syncoid -r --no-sync-snap music [email protected]:musicstore | tee -a $LOG 2>&1 | ||
/usr/sbin/syncoid -r --no-sync-snap music [email protected]:pool0/music | tee -a $LOG 2>&1 | ||
/usr/sbin/syncoid -r filestore [email protected]:filestore | tee -a $LOG 2>&1 | ||
/usr/sbin/syncoid -r filestore [email protected]:pool0/pool1 | tee -a $LOG 2>&1 | ||
|
||
offsite () { | ||
echo "`date` - syncing filestore-moyles..." | tee -a $LOG | ||
/usr/sbin/syncoid -r --no-sync-snap --sshkey="/usr/local/share/backup/steve-moyles-rsa" filestore [email protected]:pool0/pool1 | tee -a $LOG 2>&1 | ||
echo "`date` - syncing music-moyles" | tee -a $LOG | ||
/usr/sbin/syncoid -r --no-sync-snap --sshkey="/usr/local/share/backup/steve-moyles-rsa" music [email protected]:pool0/music | tee -a $LOG 2>&1 | ||
} | ||
|
||
|
||
|
||
onsite & | ||
offsite & | ||
wait | ||
echo "`date` - replication complete." | tee -a $LOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters