backup:
$ sudo tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
Restoring: make sure you and the backup file are in the root of the
filesystem, then
$ sudo tar xvpfz backup.tgz -C /
password protecting a web directory (the right way) in three easy steps
Don't use htaccess
add this to /etc/apache2/httpd.conf
<Directory /var/www/tech>
AuthUserFile /home/<user>/webserver/.htpasswd
AuthName "Please Log In"
AuthType Basic
require valid-user
</Directory>
$ sudo htpasswd -c /home/<user>/webserver/.htpasswd <username>
$ sudo /etc/init.d/apache2 restart