Answer the question
In order to leave comments, you need to log in
How to make automatic transfer of files from one directory to another on CentOS?
Good day!
I installed the VestaCP control panel on the CentOS server and got upset.
She does not know how to save backups via WebDAV, only via FTP.
But I have a paid POISON, there is 1TB, which was planned to be used just for backup.
Mounting the Disk and making it in Startup was no problem.
But, I would also like to make backups from the /home/backup/ folder move to /mnt/yandex.disk/backup/ Tell me
, how to make it do it correctly using the crown?
UPD: Or maybe you can fix the path right away? So that copies fall immediately on the POISON?
Answer the question
In order to leave comments, you need to log in
For example, you can write a copy script and run it at the right time.
#!/bin/bash
DIRECTORY=/mnt/yandex.disk/backup
if [ -d "$DIRECTORY" ]; then
cp /home/backup/архив_с_резервной_копией.tar.gz $DIRECTORY
fi
Options:
1. Mount
mount --bind /home/backup /mnt/yandex.disk/backup
2. Make a symbolic link
ln -s /home/backup /mnt/yandex.disk/backup
3. Monitor with the same find krone
find /home/backup -name=* -exec cp -r --parents {} /home/yandex.disk/backup ;\
4. It seems that Yandex disk can specify which directory to synchronize. Maybe I'm wrong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question