Answer the question
In order to leave comments, you need to log in
Backup server files on the server using tar, ftp - which is better?
There is a backup of folders and files from the Primary server to the Backup .
On the main server , the .sh file launched by CRON looks like this:
tar -zcvf $DIR/home.tar.gz --listed-incremental=$DIR/home_meta . --exclude-vcs --exclude="./backup" --exclude="./tmp" --exclude="./assets" --exclude=".htaccess"
cd $DIR
ftp -n $FTPS <<EOF
user $FTPU $FTPP
put home.tar.gz
quit
EOF
rm -f home.tar.gz
cd $DIR
tar -zxvpf home.tar.gz -C $HOME
rm -f home.tar.gz
Answer the question
In order to leave comments, you need to log in
3. If there is enough space, then it is better to first make a copy of the data side by side, and only then pack the copy in order to avoid the situation that while the packing was in progress, the data has changed. Then delete the copy.
It's better to copy something over ssh - scp, sftp... so as not to tempt kakers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question