krot

ssh dump db and file бэкап

Jan 28th, 2016
82
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mysqldump -u username -p -f database > /home/dump.sql
  2. mysqldump --single-transaction -u ИМЯ -pПАРОЛЬ ИМЯБАЗЫ | gzip > dump.sql.gz
  3. mysqldump --single-transaction -u ИМЯ -pПАРОЛЬ --all-databases | gzip > alldb.sql.gz
  4.  
  5. tar -vzcf db_dump.tar.gz /home/dump.sql
  6. tar -vzcf file.tar.gz .
  7.  
  8. tar --exclude='/var/www/image' -vzcf file.tar.gz /var/www
RAW Paste Data