-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbackup_freenet2.sh
executable file
·31 lines (31 loc) · 1.11 KB
/
backup_freenet2.sh
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
30
31
#make backup of freenet install package
#must be run with sudo
mv ./etc ./etc2
mkdir ./etc
cp -a /etc/apache2 ./etc/apache2
#chown -R freenet:freenet ./etc/apache2
cp -a /etc/dhcp3 ./etc/dhcp3
#chown -R freenet:freenet ./etc/dhcp3
cp -a /etc/network ./etc/network
#chown -R freenet:freenet ./etc/network
cp -a /etc/bind ./etc/bind
#chown -R freenet:freenet ./etc/bind
cp -a /etc/hosts ./etc/hosts
#chown freenet:freenet ./etc/hosts
cp -a /etc/sudoers ./etc/sudoers
#chown freenet:freenet ./etc/sudoers
cp -a /etc/resolv.conf ./etc/resolv.conf
#chown -R freenet:freenet ./etc/resolv.conf
cp -a /etc/snmp ./etc/snmp
chown -R freenet:freenet ./etc
#cp -a /etc/samba ./etc/samba
#chown -R freenet:freenet ./etc/samba
#note change user and password as needed
mysqldump -usacarlson -ppassword --all-databases > mysql_all.sql
#mysqldump -usacarlson -ppassword freenet2 > freenet2.sql
#mysqldump -usacarlson -ppassword cacti > cacti.sql
#mysqldump -usacarlson -ppassword chat > chat.sql
#mysqldump -usacarlson -ppassword phpbb2 > phpbb2.sql
chown freenet:freenet ./mysql_all.sql
tar -zcvf freenet2.tar.gz ./
chown freenet:freenet ./freenet2.tar.gz