blog:backuppc_script_archive_all_hosts
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | blog:backuppc_script_archive_all_hosts [2017-10-27 20:25] (current) – brb | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Backuppc: script archive all hosts ====== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | Since all backupc will reside on the backup servers disk, it's important to create archives and store them offline and at a remote site. | ||
+ | |||
+ | This script will perform an archive of all hosts using the settings of the '' | ||
+ | |||
+ | <file bash backuppc-archive-all.sh> | ||
+ | #!/bin/bash | ||
+ | # Backuppc archive utility | ||
+ | # Archives all hosts to the configured archive host | ||
+ | # Author: Bernhard Brunner | ||
+ | # Last modified: 2017-10-27 20:16 | ||
+ | hostsfile="/ | ||
+ | archivestart="/ | ||
+ | hosts="" | ||
+ | while read -r line; do | ||
+ | # Skip comments | ||
+ | [[ " | ||
+ | |||
+ | host=`echo $line | cut -f 1 -d " "` | ||
+ | [ " | ||
+ | |||
+ | hosts=" | ||
+ | done < " | ||
+ | echo Backing up $hosts | ||
+ | sudo -u backuppc $archivestart archive backuppc $hosts | ||
+ | </ | ||
+ | |||
+ | |||
+ | {{tag>}} | ||
+ | |||
+ | |||
+ | ~~DISCUSSION~~ | ||
blog/backuppc_script_archive_all_hosts.txt · Last modified: 2017-10-27 20:25 by brb