X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=Makefile;h=3e684ae1b981bde009b76d37c3f5599250bbda7a;hb=9cb8eb2c382eac305e8210d450694b337b5ca1e2;hp=c1424c061d1439c258a329937cc09749f957e8ba;hpb=d96ff2838e56a2b734fcd4b1cad3acb0c26e02ae;p=BackupPC.git diff --git a/Makefile b/Makefile index c1424c0..3e684ae 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,84 @@ +tmp=/tmp/backuppc-svn/ +target=/data/backuppc/ +profile_opt= +profile_file=profile +db=backuppc + all: @echo "make install to install BackupPC using sudo" test: stop reinstall start reinstall: - sudo perl ./configure.pl --batch --config-path=/data/backuppc/data/conf/config.pl + sudo perl ./configure.pl --batch --config-path=$(target)/data/conf/config.pl + +agi: + sudo /etc/init.d/backuppc-agi stop + sudo perl ./configure.pl --batch --config-path=/data/backuppc-agi/data/conf/config.pl + cd custom/ && find . -type f | grep -v '.svn' | sudo cpio -puV /data/backuppc-agi/ + sudo /etc/init.d/backuppc-agi start + +qc: + sudo /etc/init.d/backuppc-qc stop + sudo perl ./configure.pl --batch --config-path=/data/backuppc-qc/data/conf/config.pl + cd custom/ && find . -type f | grep -v '.svn' | sudo cpio -puV /data/backuppc-qc/ + sudo /etc/init.d/backuppc-qc start install: sudo perl ./configure.pl start: - sudo -u backuppc /data/backuppc/bin/BackupPC -d + #sudo -u backuppc /data/backuppc/bin/BackupPC -d + sudo $(target)/etc/backuppc start stop: - sudo -u backuppc killall BackupPC || true + #sudo -u backuppc killall BackupPC && sleep 1 || true + sudo $(target)/etc/backuppc stop + +install-etc: + test -d $(target)/etc || sudo cp -r etc $(target) && sudo chmod 755 $(target)/etc/backuppc + +update: + sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb + +index: test + sudo rm -Rf /data/backuppc/data/casket || true + sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -j + +xls: test + sudo -u backuppc /data/backuppc/bin/BackupPC_xls_report + which gnumeric && gnumeric /tmp/report.xls || cp -vf /tmp/report.xls ~/public_html/ + +asa: + rm -Rf $(tmp) + svn export . $(tmp) + rsync -rav $(tmp) 10.210.99.1:backuppc-svn/ + rm -Rf $(tmp) + +html: + test ! -z "`svn2html.pl`" && svn update && svn2html.pl > doc/Changes.html + +profile: test + test -e tmon.out || touch tmon.out + sudo chown backuppc tmon.out + dropdb $(db) || echo "skip drop db" + createdb $(db) + date > $(profile_file) + echo "## NORMAL RUN" >> $(profile_file) + sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -c $(profile_opt) | tee -a $(profile_file) + echo "## DProf RUN" >> $(profile_file) + sudo -u backuppc perl -d:DProf /data/backuppc/bin/BackupPC_updatedb -d $(profile_opt) + dprofpp 2>&1 | tee -a $(profile_file) + echo "## DBI_PROFILE RUN" >> $(profile_file) + DBI_PROFILE=2 sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb -d $(profile_opt) 2>&1 | tee -a $(profile_file) + mv $(profile_file) profile.`perl -e 'my @p = glob("profile.[0-9]*"); print scalar @p + 1'` + +tar: test + psql -c "delete from backup_parts" backuppc + sudo -u backuppc /data/backuppc/bin/BackupPC_tarIncCreate -h llin -s /etc -n 10 -v -f -d + +inc: test + sudo -u backuppc /data/backuppc/bin/BackupPC_incPartsUpdate -c -v + +burn: test + sudo /data/backuppc/bin/BackupPC_burnArchiveCLI