# wget -r -l 0 -nH -np -cut-dirs=2 OptionĪll these tasks have to be automated and added to Cron. Recursively move files in directory tree to/from SFTP/FTP server while preserving source directory structure When moving files to/from the server, WinSCP by defaults moves the subfolders too (removes them from the source directory). The following command recursively downloads ‘images’ folder, with all its content from FTP server and saves it to the current directory. Let’s say we have the following structure in FTP home directory: //www/images To extract the archive, type: # tar -zxvf Download a Particular Folder from FTP The previous command creates an archive, named something like. Now you can compress the folder with your site as follows: # tar -czf site-backup-$(date +%Y%m%d-%H%M%S).tar.gz IP address or domain name of an FTP serverĭisable generation of host-prefixed directoriesĭrwxr-xr-x 4 user group 4096 18:20 Backup Downloaded Site The following command recursively downloads your site with all its files and folders from FTP server and saves them to the current directory. # cd ~/backups Download Entire Site from FTP For example, let’s create the folder backups in a home directory. This article describes how to recursively download your WebSite with all files, directories and sub-directories from FTP server, using Wget utility.įirst of all create a folder in which you are going to download a site. Backing up your WebSite is a necessary step for all users.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |