Russian  English  All projects

Help set up automatic backup of the site on Google drive



ubuntu 18, need automatic backup to Google Drive
did everything according to the instructions https://aeb-blog.ru/linux/bekap-sajta-v-google-dis... installed the utility drive
made your file like this

#!/bin/sh
# Creating an archive
/usr/bin/tar -czvf /var/www/test.ru/backup-`date "%Y-%m-%d"`.tar.gz -C /var/www/html/ site
/usr/bin/tar -czvf /root/bin/backup-`date "%Y-%m-%d"`.tar.gz -C /var/www/html/ site

# Unload the database
/usr/bin/mysqldump -u play2x -pplay2xxxxx play2x | gzip -c > /root/bin/mysql-`date "%Y-%m-%d"`.sql.gz

# Upload files to g.drive
/usr/sbin/drive upload -f /var/www/test.ru/backup-*.tar.gz
/usr/sbin/drive upload -f /var/www/test.ru/mysql-*.sql.gz

/usr/sbin/drive upload -f /root/bin/backup-*.tar.gz
/usr/sbin/drive upload -f /root/bin/mysql-*.sql.gz


## Delete temporary files
rm -rf /root/bin/backup-*.tar.gz
rm -rf /root/bin/mysql-*.sql.gz

but writes an error http://joxi.ru/52aZ60vcl96EBA
-bash: /root/bin/backup.sh: cannot execute binary file: Exec format error

it is necessary to organize normal work on the kroon.
who will do it and how much will you take?
20.01.2022 20:43



 Answers freelancers