Skip to content

Instantly share code, notes, and snippets.

@brodock
Last active September 9, 2016 16:31
Show Gist options
  • Save brodock/4ea8d4e324f4e4cc8e2c3cda322edb3d to your computer and use it in GitHub Desktop.
Save brodock/4ea8d4e324f4e4cc8e2c3cda322edb3d to your computer and use it in GitHub Desktop.
Download all Dreamhost Backups
// run this inside the javascript console of the Backups page:
urls = $x('/html/body/div/div/div[4]/table/tbody/tr//a')
urls.forEach(function(e) { console.log('curl "' + e.href + '"' + ' -o "' + e.innerHTML + '"') })
// It will output a ready to use list of wget commands that will download every backup file
// If the console adds line numbering or other useless data like in chrome, try this instead:
urls = $x('/html/body/div/div/div[4]/table/tbody/tr//a')
var wget_list = ""
urls.forEach(function(e) { wget_list = wget_list + 'curl "' + e.href + '"' + ' -o "' + e.innerHTML + "\" \n" })
console.log(wget_list)
// Remember do mkdir the folders first: 'user', 'mysql', 'mail', etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment