I will try to keep this a running list with info on each command
Tar logs/Files whatever and gzip
tar -cvzf [archivename].tar.gz [File1] [File2] ....
Mysqldump to backup a DB table
Lots of times I want to make some tweaks and be able to roll back or at least compare the two versions.
mysqldump -u [user] -p[password] [database] [tables1] [table2] ... | gzip -9 > [archivename].gz //////notice there is no space between -p and the password //////you can connect to a remote host for the backup mysqldump -u [user] -p[password] -h [192.168.1.1] -c [database] [tables1] [table2] ... | gzip -9 > [archivename].gz
SCP to securely copy files from one server to another
Rsync is probably a better alternative. Remember if you want to include hidden files end the path with a period.
//For example moving a domain // you use option p to preserve the file permissions/owners and option r to perform a recursive copy of subdirectories scp -pr /srv/www/funnydomain.com/public_html/. [email protected]:/var/www/funnydomain.com/public_html/
Rsync – should have listed it the first time
Like scp or cp, but it calculates the deltas between files and only copies the parts needing updating so the bandwidth consumption is less.
rsync -zav filetocopy destination //file can be local or remote (both sides need rsync installed - apt-get install rsync) // z compresses, a adds a ton of options (recursion, keeping up with permissioning and symbolic links), v verbose
Resource Interpreted as Font but transferred with MIME type application/octet-stream
An annoying message but not hard to fix. Add the following lines to your .htaccess
AddType image/svg+xml .svg AddType application/x-font-ttf .ttf AddType application/x-font-opentype .otf AddType application/x-font-woff .woff AddType application/vnd.ms-fontobject .eot
Comments