{"id":610,"date":"2023-10-31T10:05:18","date_gmt":"2023-10-31T10:05:18","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/10\/31\/8535692-how-to-download-a-particular-website-s-backup-via-ssh-in-hostinger\/"},"modified":"2026-11-05T10:09:03","modified_gmt":"2026-11-05T10:09:03","slug":"8535692-how-to-download-a-particular-website-s-backup-via-ssh-in-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/8535692-how-to-download-a-particular-website-s-backup-via-ssh-in-hostinger\/","title":{"rendered":"How to download a particular website&#8217;s backup via SSH in Hostinger"},"content":{"rendered":"<p class=\"no-margin\">While our <b><a data-click-id=\"hgr-post-content-link-backups-tool\" class=\"intercom-content-link\" href=\"\/support\/5981435-how-to-download-backups-at-hostinger\/\" target=\"_blank\" rel=\"noopener\">Backups tool<\/a><\/b> is designed to download files of all the websites within a particular hosting plan at once, you can download a backup of a particular website via SSH.<\/p>\n<div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">This method doesn\u2019t apply to sites created with <b>Hostinger AI Builder<\/b><\/p>\n<\/div>\n<h2 id=\"h_45b6814434\">Step 1 \u2013 Preparations<\/h2>\n<p class=\"no-margin\">To begin, you\u2019ll need two things:<\/p>\n<ol>\n<li>\n<p class=\"no-margin\">Enough <b><a data-click-id=\"hgr-post-content-link-storage\" class=\"intercom-content-link\" href=\"\/support\/2436138-how-to-check-resource-usage-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">storage<\/a><\/b> for at least your desired website\u2019s <b>public_html <\/b>folder size<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b><a data-click-id=\"hgr-post-content-link-ssh-access\" class=\"intercom-content-link\" href=\"\/support\/1583645-how-to-enable-ssh-access-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">SSH access<\/a><\/b>, which is available with Premium web hosting plans or greater<\/p>\n<\/li>\n<\/ol>\n<p class=\"no-margin\">Make sure you\u2019ve enabled SSH access and connect to your hosting plan: <b><a data-click-id=\"hgr-post-content-link-how-to-connect-to-a-hosting-plan-via-ssh\" class=\"intercom-content-link\" href=\"\/support\/1583245-how-to-connect-to-a-hosting-plan-via-ssh-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">How to Connect to a Hosting Plan via SSH<\/a><\/b><\/p>\n<h2 id=\"h_8e1c4d23fc\">Step 2 \u2013 Navigate to the correct location<\/h2>\n<p class=\"no-margin\">Once connected via SSH, you\u2019re located in its <b>root directory<\/b>. To double-check it, use the command<b> <\/b><code>ls<\/code><b> <\/b>and hit the <b>Enter <\/b>button. You\u2019ll get a result similar to this:<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2023\/10\/9eceeb27-c85e-45a0-b0da-3fe6abce1e45.jpg\/public\" alt=\"Terminal showing SSH directory listing with domains and public_html folders highlighted\" data-media-id=\"2763\" \/><\/div>\n<p class=\"no-margin\">The <b>domains<\/b> folder has all your websites\u2019 files separated into individual folders (except for builder-based websites). Navigate to the <b>domains<\/b> folder using the <code>cd domains<\/code> command. Once you\u2019re there, use the <code>ls<\/code> command again to see the content within the <b>domains <\/b>folder:<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2023\/10\/54fbfa92-6b8a-4a95-acac-c730aa909e1e.jpg\/public\" alt=\"Terminal showing .bash_history and several domain names listed, with one highlighted in blue\" data-media-id=\"2764\" \/><\/div>\n<p class=\"no-margin\">You should see all your websites listed there.<\/p>\n<h2 id=\"h_3886086093\">Step 3 \u2013 Generate a compressed folder<\/h2>\n<p class=\"no-margin\">Create a compressed folder of your preference:<\/p>\n<h3 id=\"h_49a6259beb\">Compressing to .TAR.GZ<\/h3>\n<p class=\"no-margin\">Use the command below. Replace <code>folder-name<\/code> with the title of your preferred website\u2019s folder, and hit the <b>Enter<\/b> button:<\/p>\n<pre><code>tar -czvf folder-name.tar.gz \/folder-name<\/code><\/pre>\n<h3 id=\"h_bd298cead8\">Compressing to .ZIP<\/h3>\n<p class=\"no-margin\">Use the command below. Replace <code>folder-name<\/code> with the title of your preferred website\u2019s folder, and hit the <b>Enter<\/b> button:<\/p>\n<pre><code>\u200bzip -r folder-name.zip folder-name\/<\/code><\/pre>\n<p class=\"no-margin\">Once you do that, you\u2019ll see a list of subfolders and files that have been added to your compressed folder. Then, you can use new commands again. Depending on your website\u2019s size, it might take a few minutes.<\/p>\n<p class=\"no-margin\">You may use the command <code>ls<\/code> again to check if the new compressed file is now created and listed on your current location.<\/p>\n<h2 id=\"h_00e6010116\">Step 4 \u2013 Get the name of your database (optional for WordPress)<\/h2>\n<p class=\"no-margin\">If your website is built with WordPress, you might want to double-check the name of your website\u2019s database. In that case, navigate to the website\u2019s folder:<\/p>\n<pre><code>cd folder-name\/public-html<\/code><\/pre>\n<p class=\"no-margin\">And get its database name with the following command (no need to replace anything here):<\/p>\n<pre><code>wp config get DB_NAME<\/code><\/pre>\n<p class=\"no-margin\">Then, copy the output (the title of your site\u2019s database) prompted on your screen and save it somewhere for later:<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2023\/10\/bdfde603-cd8a-4c52-9b8a-6de8d941ab2b.jpg\/public\" alt=\"Hostinger VPS terminal showing wp config get DB_NAME command output with database name u817052417_ibFX6\" data-media-id=\"2766\" \/><\/div>\n<p class=\"no-margin\">After checking your database\u2019s title, don\u2019t forget to navigate back to the <b>domains<\/b> folder with the command:<\/p>\n<pre><code>cd ..\/..<\/code><\/pre>\n<h2 id=\"h_4460b6bc44\">Step 5 \u2013 Export and compress database (optional)<\/h2>\n<p class=\"no-margin\">If you already know the name of your website\u2019s database, you may now <b><a data-click-id=\"hgr-post-content-link-export-it-via-ssh\" class=\"intercom-content-link\" href=\"\/support\/4536328-how-to-export-a-database-over-ssh-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">export it via SSH<\/a><\/b>. Once exported, you\u2019ll be able to see the <b>.SQL<\/b> file in your location:<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2023\/10\/787ae2b7-65f8-4aab-9684-a8eaec37fa91.jpg\/public\" alt=\"Hostinger SSH terminal showing mysqldump command to create website-name-db-backup.sql, with the backup file highlighted\" data-media-id=\"2767\" \/><\/div>\n<p class=\"no-margin\">You may also compress this specific folder by following <b><a data-click-id=\"hgr-post-content-link-step-3\" class=\"intercom-content-link\" href=\"#h_3886086093\" target=\"_blank\" rel=\"noopener\">step 3<\/a><\/b> above: only replace the <code>folder-name<\/code> with the name of your database (<b>.SQL<\/b>) file. If you use the <b><a data-click-id=\"hgr-post-content-link-zip-command\" class=\"intercom-content-link\" href=\"#h_bd298cead8\" target=\"_blank\" rel=\"noopener\">zip command<\/a><\/b>, remove the <code>-r<\/code> part from the command, as it\u2019s only used for folder compression. For example:<\/p>\n<pre><code>zip website-name-db-backup.zip website-name-db-backup.sql<\/code><\/pre>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2023\/10\/2a9d1e92-5b5d-466b-8b0c-a6e01415a290.jpg\/public\" alt=\"SSH terminal showing zip command creating website-name-db-backup.zip from website-name-db-backup.sql\" data-media-id=\"2768\" \/><\/div>\n<h2 id=\"h_5579c0d63a\">Step 6 \u2013 Download the compressed files via SSH<\/h2>\n<p class=\"no-margin\">To download the files, open a new terminal tab or disconnect from the current SSH session with the command <code>exit<\/code>:<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2023\/10\/48853f19-72e6-41df-b412-d9481ed845da.jpg\/public\" alt=\"Terminal showing logout after exiting an SSH session on a Hostinger server\" data-media-id=\"2769\" \/><\/div>\n<p class=\"no-margin\">Finally, adapt the following command to download the generated files:<\/p>\n<pre><code>scp username@hostname:\/path\/to\/remote\/file \/path\/to\/local\/file<\/code><\/pre>\n<p class=\"no-margin\">In this example, it would be:<\/p>\n<pre><code>scp -P 65002 u817052417@82.180.135.53:\/home\/u817052417\/domains\/drew-dev-br.zip \/home\/andrew.ribeiro\/Downloads<\/code><\/pre>\n<p class=\"no-margin\">And for the database:<\/p>\n<pre><code>scp -P 65002 u817052417@82.180.135.53:\/home\/u817052417\/domains\/website-name-db-backup.zip \/home\/andrew.ribeiro\/Downloads<\/code><\/pre>\n<p class=\"no-margin\">You\u2019ll be prompted to enter your password, and the files will be downloaded!<\/p>\n<p class=\"no-margin\">After that, we highly recommend you connect to your hosting via SSH again (<b><a data-click-id=\"hgr-post-content-link-step-1\" class=\"intercom-content-link\" href=\"#h_45b6814434\" target=\"_blank\" rel=\"noopener\">step 1<\/a><\/b>) and remove the generated files with the following command (so that they wouldn\u2019t consume your hosting plan\u2019s resources):<\/p>\n<pre><code>rm<\/code><\/pre>\n<h2 id=\"h_2ab0cb3b63\">Step 7 \u2013 Download the compressed files via the file manager (optional)<\/h2>\n<p>Open <b><a data-click-id=\"hgr-post-content-link-file-manager\" class=\"intercom-content-link\" href=\"\/support\/4548688-basic-actions-in-the-file-manager-in-hostinger\/\" target=\"_blank\" rel=\"noopener\">File Manager<\/a><\/b>, and click the Home folder icon (\u2302) at the start of the file path to open all the files in your hosting plan:<\/p>\n<p class=\"no-margin\"><img decoding=\"async\" class=\"alignnone size-full wp-image-24621\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_13-31_1.png\" alt=\"\" width=\"1579\" height=\"795\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_13-31_1.png 1579w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_13-31_1-300x151.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_13-31_1-1024x516.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_13-31_1-768x387.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_13-31_1-1536x773.png 1536w\" sizes=\"(max-width: 1579px) 100vw, 1579px\" \/><\/p>\n<p class=\"no-margin\">Navigate to the domains folder, right-click the desired files or folders, and select <strong>Download<\/strong> (or Download as ZIP for folders). Once finished, right-click these files and select <strong>Delete<\/strong> to free up space.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-24690\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-08.png\" alt=\"\" width=\"692\" height=\"784\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-08.png 692w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/11\/2026-11-05_17-08-265x300.png 265w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/p>\n<p class=\"no-margin\">And that\u2019s it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Downloading a backup of a particular website<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_content_updated_date":"","include_on_kodee":true,"footnotes":""},"categories":[236],"tags":[],"class_list":["post-610","post","type-post","status-publish","format-standard","hentry","category-backups-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/8535692-how-to-download-a-particular-website-s-backup-via-ssh-in-hostinger","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=610"}],"version-history":[{"count":7,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/610\/revisions"}],"predecessor-version":[{"id":24691,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/610\/revisions\/24691"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}