forked from bebehei/backup-with-borg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
showBackupInfo
executable file
·29 lines (27 loc) · 981 Bytes
/
showBackupInfo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env zsh
# Specify list of repositories, separated by spaces. E.g.:
# repolist=( default repo2 repo3 )
repolist=( default )
for repo in ${repolist[*]}; do
IFS=$'\n';
Z=(`BACKUP_CONF=$repo backup list`);
unset IFS;
LBU=`echo ${Z[-1]} | awk '{print $1}'`;
echo "";
echo "_______________________________________________________________________________";
echo "";
echo "BACKUP LIST FOR REPO: " $repo;
echo "";
for i ("$Z[@]") print -r -- $i;
echo "";
echo "_______________________________________________________________________________";
echo "";
echo "INFO FOR REPO: " $repo;
echo "";
BACKUP_CONF=$repo backup info 2>/dev/null | egrep "Repository|Location|Encrypted|Key|Cache|Security";
echo "_______________________________________________________________________________";
echo "";
echo "INFO FOR LAST BACKUP ($LBU): ";
echo "";
BACKUP_CONF=$repo backup info ::$LBU 2>/dev/null;
done