Using dd you can make a bit for bit clone of a harddrive/partition. dd takes two parameters. if, the source and of, the destination. dd if=/dev/sda of=~/backup.img This will make a copy of the entire disk, if you were to put sda1 you’d get the first partition. Make sure to only run these commands when [...]
Articles
04.03.12 - Clone a Harddrive Linux
18.02.12 - Restoring MySQL from data files
MySQL stores all its data in the following location /var/lib/mysql/<database> Simply make a copy of these files and you have a backup, when restoring make sure its owned by mysql.
18.12.11 - MySQL Backup/Restore database
The following command will back up your MySQL database to a file. mysqldump –add-drop-table -u user -p database > outputfile.sql The following will restore your database. mysql -u root -p database < outputfile.sql Or for a complete server back up and compression: mysqldump -u root -p --all-databases | gzip > output.sql.gz
