Skip to content

Instantly share code, notes, and snippets.

@n8kowald
Created November 5, 2019 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8kowald/f44822d05c13c1559ce6436052250191 to your computer and use it in GitHub Desktop.
Save n8kowald/f44822d05c13c1559ce6436052250191 to your computer and use it in GitHub Desktop.
Download a full backup of a website
# --mirror: Turn on options suitable for mirroring. This option turns on recursion and time-stamping, sets infinite recursion depth and keeps FTP directory listings
# --page-requisites: This option causes Wget to download all the files that are necessary to properly display a given HTML page. This includes such things as inlined images, sounds, and referenced stylesheets.
# --adjust-extension: If a file of type application/xhtml+xml or text/html is downloaded and the URL does not end with the regexp \.[Hh][Tt][Mm][Ll]?, this option will cause the suffix .html to be appended to the local filename.
# --convert-links: After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content, such as embedded images, links to style sheets, hyperlinks to non-HTML content, etc.
wget --mirror --page-requisites --adjust-extension --convert-links https://www.website.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment