get latest fix
[mediawiki-setup] / Mediawiki_Setup_Guide
index 08028729fbfde68a76655fe7e3e6a1e43a4f2571..f060408fe457d852a70828a451b3ec0be8a95ea4 100644 (file)
@@ -893,21 +893,27 @@ sudo dd of=$backup_script <<'EOFOUTER'
 last_error=0
 trap 'last_error=$?' ERR
 source ~/mw_vars
+# No strict because the host is likely not named the same as
+# the domain.
+ssh="ssh -oStrictHostKeyChecking=no"
 logfile=/var/log/${mwdomain}_backup.log
 {
 echo "#### starting backup at $(date) ####"
-ssh root@$mwdomain <<ENDSSH
+$ssh root@$mwdomain <<ENDSSH
 set -x
 tee -a $mwc<<'EOF'
 \$wgReadOnly = 'Dumping Database, Access will be restored shortly';
 EOF
 mkdir -p ~/wiki_backups
 mysqldump -p$dbpass --default-character-set=binary my_wiki  > ~/wiki_backups/wiki_db_backup
-sed -i --follow-symlinks '\$ d' $mwc # delete read only setting
+sed -i '\$ d' $mwc # delete read only setting
 ENDSSH
+# add no strict option to the defaults
+
+rdiff() { rdiff-backup --remote-schema "$ssh -C  %s rdiff-backup --server" "$@"; }
 set -x
-rdiff-backup root@$mwdomain::/root/wiki_backups ~/backup/${mwdomain}_wiki_db_backup
-rdiff-backup root@$mwdomain::$mw ~/backup/${mwdomain}_wiki_file_backup
+rdiff root@$mwdomain::/root/wiki_backups ~/backup/${mwdomain}_wiki_db_backup
+rdiff root@$mwdomain::$mw ~/backup/${mwdomain}_wiki_file_backup
 set +x
 echo "=== ending backup at $(date) ===="
 }  &>>$logfile