Upload backup files to other server with crontab or sh

General support questions
Post Reply
helenelliott
Posts: 1
Joined: 2019/12/24 09:57:25

Upload backup files to other server with crontab or sh

Post by helenelliott » 2020/01/03 07:18:47

I have created a crontab for mysql daily backup at night. However, the backup is still on the local server. I want all the files from that server to be automatically uploaded to my other server or gdrive. Can anyone help me with the script I should write? The script should automatically upload all the files from the server after backup to another server.

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: Upload backup files to other server with crontab or sh

Post by tunk » 2020/01/03 15:41:32

Export/mount a directory using sshfs, NFS or CIFS/SMB?

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: Upload backup files to other server with crontab or sh

Post by KernelOops » 2020/01/03 16:40:40

You may even use rsync over ssh or scp, with specific keys for that service only. The only restriction is, that they can't be password protected, so they work via cron. Rsync is great because it can recover and re-start from the last position.

Other solutions depend on your network setup, like shared storage volumes, etc.
--
R.I.P. CentOS :cry:
--

Post Reply