export content script 7
This commit is contained in:
parent
1840e32587
commit
a287d602d8
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
exit
|
||||
|
@ -25,6 +24,7 @@ if [[ "$answer" == "y" ]]; then
|
|||
mkdir -p "${export_folder}"
|
||||
mysqldump -u directus -p"${db_password}" directus > "${export_folder}/db_${site_name}_${current_date}.sql"
|
||||
cp -r /var/www/repositories/cms*/uploads "${export_folder}"
|
||||
cp -r /var/www/repositories/cms*/.env "${export_folder}"
|
||||
tar -czf "${export_folder}.tar.gz" -C "${export_base_folder}" .
|
||||
rm -r "${export_folder}"
|
||||
chown -R "${user}:${user}" "${export_base_folder}"
|
||||
|
|
Loading…
Reference in New Issue