Website backup
wget
wget -xkrNE -nH {url} -P /path/to/target/folder/
wget -xkrNE -nH http://charlotteeifler.works/ -P /var/www/html/ce/- -kafter the download is complete, convert the links in the document to make them suitable for local viewing
- -xcreate a hierarchy of directories
- -rrecursive
- -Nif the local file has the same timestamp as the server, or a newer one, the remote file will not be re-fetched
- -Eaka- --adjust-extensionwill change the file extension to .html or .css or .xml if the file-type suggests it
- -nHdisable generation of host-prefixed directories
- -P /path/to/target/folder/will create target folder is non-existent
The -E option is useful to bypass problems related to
.css when there is a ?ver=… at the end.
If you download a Wordpress site, don’t forget to delete the file
wp-login.php in the root directory. This file will still
point to the source loction.
Note to self… investigate:
- –no-parent