lvm-xfs/backup-restore.sh

raw link view readme
1 yum install xfsdump -y
2
3 for n in $(seq 10); do echo $n > /var/log/mongologs/$n.txt; done
4
5 mkdir -p /var/backup/logs
6
7 xfsdump -l 0 -L taco -M burrito -f /var/backup/logs/mongologs.xfs.backup /var/log/mongologs
8
9
10 xfsrestore -I
11
12 rm -f /var/log/mongologs/*
13
14 xfsrestore -f /var/backup/logs/mongologs.xfs.backup -L taco /var/log/mongologs
15