hi, i would like to know if there’s a way to back-up my public_html directory only to a remote server. note: i don’t want to create a snapshot. only my public_html. if there’s an external service that would be cool
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Compress the whole directory and transfer it to another server using SCP.
cd /var/backups
export FILE_DATE=`date +%Y%m%d-%H.%M.%S`
tar -czf public_html-$FILE_DATE.tar.gz /location/to/public_html
scp public_html-$FILE_DATE.tar.gz username@remote.server.ip:/remote/directory
unset FILE_DATE
To back up your public_html directory to a remote server, you have several options. Here are a few methods you can consider:
public_html directory to a remote server by running a command like:rsync -avz --progress /path/to/public_html user@remote_server:/path/to/backup/
-avz options are for archive mode, verbose, and compression, respectively, and --progress shows the progress of the transfer.public_html directory would be:scp -r /path/to/public_html user@remote_server:/path/to/backup/
-r option is for recursive copying to include subdirectories.FTP/SFTP Client:
Cloud Storage Services:
public_html directory regularly.Web Hosting Control Panels:
public_html directory and set a remote FTP or SCP destination for the backup.Backup Services:
Custom Scripts:
Before you proceed with any of these options, ensure that you have the necessary permissions to access both the local public_html directory and the remote server. Also, consider the security implications of transferring sensitive data and encrypt your backups if possible.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.