backup program รพ
copy dropbox folder krifoxone
ssh serverdell@192.168.1.25
ssh kriengten@192.168.1.25
mysqldump -h localhost -u root -pkri tikisvn3>tiki160109.sql
tar -cvzf tiki160109.tar.gz tiki160109.sql
wget http://192.168.1.251/tikisvn3.tar.gz
tar -xvzf tikisvn3.tar.gz
mysql -u root -pkri tikisvn3<tiki160109.sql
or
tar -xzOf your_db_dump.sql.tar.gz | mysql -u USERNAME -pPASSWORD your_database
Exporting a Compressed MySQL Dump
This command will dump a MySQL database, compress it on-the-fly and save it to a file. Replace keywords between { and } with their proper values (while also removing the brackets of course).
1
mysqldump -u {user} -p {database} | gzip > {database}.sql.gz
Usually I prefer to use a slightly different variation and prepend the date. This is useful if you’ve done a dump before and want to avoid overwriting it, etc. And most importantly: its cleaner.
1
mysqldump -u {user} -p {database} | gzip > `date -I`.database.sql.gz
Importing a Compressed MySQL Dump
The import command takes a compressed MySQL dump as input, decompresses it and adds it to the database on-the-fly. This differs from the two-step approach (where you first decompress the file and then import it) in that here we’ll decompress and import at the same time (making good use of pipes).
1
gzip -dc < {database}.sql.gz | mysql -u {user} -p {database}
Following the convention I use for the export command, what I actually do most of the times is:
1
gzip -dc < `date -I`.{database}.sql.gz | mysql -u {user} -p {database}