SSH Backup public_html


Well-known member
Looking to download my public_html files so I can create a testsite for XF 2.2

Logged into the public_html directory on Putty SSH - Does anyone know the command I need to use to make a copy of this? Tried searching the net, but so many variables and not having much joy!


Well-known member
you can't just download from your sever to your desktop over ssh... Logging into the shell doesn't really know anything about your local computer.

if you want another copy on your server, COPY it like

cp -Rf /home/site/public_html/ /home/site/public_html/testsite/

which will copy all the files in root to a new folder called testsite/ (Note, you may need to create the folder first)

But then you risk having 2 front ends hitting 1 db.

You are really best off making a db backup of your site, creating a test database, and then just installing xf to /testsite/ and point it's config file to your backup/test db instance.


XenForo moderator
Staff member
Assuming you want to have a local test installation, zip/tar the server files and database then you can download them either via SSH or FTP.