create backup of files first, add verbosity back
This commit is contained in:
parent
60dabf5084
commit
eebea4ce0d
|
@ -8,8 +8,12 @@ backup_dir="$1"
|
||||||
|
|
||||||
echo "restoring from $backup_dir"
|
echo "restoring from $backup_dir"
|
||||||
|
|
||||||
cat "$backup_dir/$backup_dir.tar" | ssh "$remote_ssh" "cd /; tar zxf -"
|
backup_dest="/tmp/wp-content-$(date +%s)"
|
||||||
|
ssh "$remote_ssh" "mv $remote_wp_path/wp-content $backup_dest"
|
||||||
|
echo "remote wp-content backed up as: $backup_dest"
|
||||||
|
cat "$backup_dir/$backup_dir.tar" | ssh "$remote_ssh" "cd /; tar zxvf -"
|
||||||
|
|
||||||
|
# TODO - backup database first?
|
||||||
cat "./$backup_dir/$backup_dir.sql" | wp db import --ssh="$remote_ssh$remote_wp_path" -
|
cat "./$backup_dir/$backup_dir.sql" | wp db import --ssh="$remote_ssh$remote_wp_path" -
|
||||||
|
|
||||||
wp search-replace "$local_protocol://$local_domain" "$remote_protocol://$remote_domain" \
|
wp search-replace "$local_protocol://$local_domain" "$remote_protocol://$remote_domain" \
|
||||||
|
|
Loading…
Reference in New Issue