public
Description: Simple backup shell scripts
Homepage:
Clone URL: git://github.com/raphinou/shbackup.git
shbackup / centralise-backups.sh
100755 14 lines (7 sloc) 0.306 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
 
. ./backup_vars.sh
 
 
vservers=$(/usr/sbin/vserver-stat | /usr/bin/awk '$1!="0" && NR>1 { print $8 }')
 
 
 
for vserver in $vservers; do
backup_file=$(find /etc/vservers/${vserver}/vdir/data/backup -maxdepth 1 -type f)
        [[ -n $backup_file ]] && cp $backup_file $backup_base
done