Last active
June 16, 2022 17:38
-
-
Save sukhikh18/4ee6df1e5c4630e9f0a142982e071f8a to your computer and use it in GitHub Desktop.
Revisions
-
sukhikh18 revised this gist
Jun 16, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,2 @@ cat ./site-backup.sql | mysql -hdb -uroot -padmin tablename gunzip -c ./site-backup.sql.gz | mysql -hdb -uroot -padmin tablename -
sukhikh18 revised this gist
May 26, 2022 . 3 changed files with 7 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ mysqldump -uadmin --password="admin" --no-tablespaces tablename > ./site-`date '+%Y%m%d'`.sql \ --ignore-table=DATABASE.table1 mysqldump -uadmin --password="***" --no-tablespaces app | gzip > ./site-`date '+%Y%m%d'`.sql.gz This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ cat ./site-backup.sql | mysql -hdb -uroot -padmin tablename ungzip -c ./site-backup.sql.gz | mysql -hdb -uroot -padmin tablename This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,13 +7,4 @@ tar -czvf ./site-`date '+%Y%m%d'`.tar.gz \ --exclude '*upload/*' \ /var/www/sitename/current/ tar -czvf ./site-`date '+%Y%m%d'`-upload.tar.gz /var/www/sitename/shared/upload/ -
sukhikh18 created this gist
Dec 27, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ tar -czvf ./site-`date '+%Y%m%d'`.tar.gz \ --exclude '*bitrix/tmp/*' \ --exclude '*bitrix/updates/*' \ --exclude '*bitrix/backup/*' \ --exclude '*bitrix/*cache/*' \ --exclude '*bitrix/admin/strace/log*' \ --exclude '*upload/*' \ /var/www/sitename/current/ tar -czvf ./site-`date '+%Y%m%d'`-upload.tar.gz /var/www/sitename/shared/upload/ mysqldump -uadmin --password="admin" --no-tablespaces tablename > \ ./site-`date '+%Y%m%d'`.sql \ --ignore-table=DATABASE.table1 mysqldump -uadmin --password="***" --no-tablespaces admin \ | gzip > ./rtg-`date '+%Y%m%d'`.sql.gz find . -type f -mtime -2 -print0 | xargs -0 tar -cvf last-day-mod.tar