Last active
September 9, 2016 16:31
-
-
Save brodock/4ea8d4e324f4e4cc8e2c3cda322edb3d to your computer and use it in GitHub Desktop.
Download all Dreamhost Backups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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