Last active
May 7, 2020 11:49
-
-
Save IlyaZha/5d3aef4f609000a6a8db0ac79760bf8f to your computer and use it in GitHub Desktop.
crontab
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 characters
Всякие полезные команды | |
0 4 * * * mysqldump -uroot -p database --ignore-table=database.core_url_rewrite | gzip > `date +database.%Y%m%d.%H%M%S.sql.gz` | |
0 4 * * * find /backups -type f -mtime +30 -print0 | xargs -0 rm -f | |
tar -pczvf archive.tar.gz --exclude={'*.avi','*.jpg','*.png','*.jpeg','*.gif'} /path/to/dir | |
sed -ie 's/ROW_FORMAT=FIXED//g' newdump.sql | |
select * from cron_schedule where created_at like '2017-05%' GROUP BY job_code | |
Найти базу и скопировать из огромного файла: | |
sed -n '/^-- Current Database: `itspurt_shopify_instockreminder`/,/^-- Current Database: `/p' 2016-03-01.sql > isr2016-03-01.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment