Skip to content

Instantly share code, notes, and snippets.

View larvel's full-sized avatar

Lars Olav Velle larvel

View GitHub Profile
@larvel
larvel / migrateserver.sh
Created September 24, 2018 19:34
Script to copy production server to test server
#!/bin/bash
USER=user
MYSQLPASSWORD=password
MYSQL="/usr/bin/mysql"
MYSQLDUMP="mysqldump --max_allowed_packet=800M"
TESTSERVER=mynewserver.mydomain.com
FOLDER=/usr/local/atlassian/
EXCLUDE="--exclude *.pid --exclude backup/*.zip --exclude atlassian-confluence.log* --exclude catalina.*.log --exclude localhost.*.log --exclude updateTestServer.sh* --exclude daily-backup-* --exclude backup-*.zip --exclude atlassian-jira.log.* --exclude catalina.out --exclude *confluencedata/index* --exclude *confluencedata/backups/* --exclude *prosjektwiki/confluencedata/backups/* --exclude *old/"