

You are free to copy materials from, but you are required to link back to Don't forget to backup your database! © GeekLabInfoīackup your website over FTP is a post from. This method does NOT backup your database. This way, lftp does not interfere with the hardlink system. Luckily, lftp doesn't just open a local file to modify its contents: instead remotely modified files are first unlinked locally, then re-downloaded. This way, a 100Mb file that is not modified can exist in all 100 directories while only using one single block of 100Mb of disk space.įinally, the script uses lftp to download all modified files from the remote ftp server. What is does, is move the directory 99 to 100, then it moves 98 to 99, 97 to 98 etc until 2 is moved to 3.

In this example the directory _old is not copied, nor is phpmyadmin. #!/bin/bash for i in ` seq 100 -1 2 ` do if then echo mv $i $ ( (i+ 1 ) ) mv $i $ ( (i+ 1 ) ) fi done echo cp -al 1 2 cp -al 1 2 HOST= "" USER= "type-username-here" PASS= "type-password-here" LCD= "/backups/1" RCD= "/remote/path/httpdocs" mkdir -p $LCD
