Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Only use on shared slots.
# Licensed under GNU General Public License v3.0
# Logs stored at $HOME/.logs/migration.log

#webhook="https://slack.com/blah"

mkdir -p "$HOME/.logs/"
export log="$HOME/.logs/migration.log"
touch "$log"
Expand Down Expand Up @@ -123,6 +126,10 @@ EOF
done
echo "Copying data from $HOME to ${newhost}:\$HOME/old... This could take some time."
rsync -ahH --info=progress2 "$HOME/" "${newuser}@${newhost}:old/" -e 'ssh -p22'
echo "Migration Complete"
if [[ -n $webhook ]]; then
curl -X POST -d '{"type": "section", "text": { "type": "mrkdwn", "text": "Migration complete for '$USER'!" }}' $webhook
fi
}

function runner() {
Expand Down