Mai jos un script de backup ... creat de mine care iti salveaza cfg din box/server pe un server ftp.

Se copiaza/salveaza scriptul intr-un folder/fisier ( ex /etc/backup.sh )

apoi il facem executabil cu chmod +x backup.sh

se adauga in crontab
crontab -e

0 */2 * * * /etc/backup.sh ( ruleaza din 2 in 2 ore )

Modificari/imbunatatiri sunt multe !




##########################################
#!/bin/sh
HOST='serverul_FTP'
USER='user_tau'
PASSWD='parola_ta'
DATE=`/bin/date +%d_%m_%Y`
TIME=`/bin/date +%H`
DAY=$(date +%A)
HOSTNAME=`hostname -s`

# folderul/folderele care trebuiesc salvate( spatiu intre foldere ).
backup_files="/folder1 /folder2 /folder3/fisier1 "

# destinatie fiser arhiva.
dest="/tmp"

# cream arhiva cu data_zi_luna.
archive_file="bkp.$DATE.$DAY.$TIME.$HOSTNAME.tar.g z"

# Print start status message.
echo "Backing up $backup_files to $dest/$archive_file"
date
echo

# Backup the files using tar.
tar czf $dest/$archive_file -P $backup_files
sleep 1
ncftpput -u $USER -p $PASSWD $HOST /folderul_ftp $dest/$archive_file ;:
sleep 1
rm -rf $dest/$archive_file
sleep 2
echo "Back up your cfg files .... complete !"



Success