export content script 6
This commit is contained in:
parent
e33b934cb0
commit
1840e32587
|
@ -23,10 +23,11 @@ if [[ "$answer" == "y" ]]; then
|
|||
export_base_folder="/home/${user}/content_exports"
|
||||
export_folder="${export_base_folder}/${site_name}_export_${current_date}"
|
||||
mkdir -p "${export_folder}"
|
||||
mysqldump -u directus -p"${db_password}" directus > "${export_folder}/db_${site_name}_${current_date}"
|
||||
mysqldump -u directus -p"${db_password}" directus > "${export_folder}/db_${site_name}_${current_date}.sql"
|
||||
cp -r /var/www/repositories/cms*/uploads "${export_folder}"
|
||||
tar -czf "${export_folder}.tar.gz" -C "${export_base_folder}" .
|
||||
chown -R "${user}:${user}" "${export_folder}"
|
||||
rm -r "${export_folder}"
|
||||
chown -R "${user}:${user}" "${export_base_folder}"
|
||||
|
||||
ssh_port=$(cat /etc/ssh/sshd_config | grep "Port " | sed 's/^Port //')
|
||||
ip=$(hostname -I)
|
||||
|
|
Loading…
Reference in New Issue