Backup to an external server
With tar and SSH, you can pipe backup data over the internet, eliminating the need to store it on the server temporarily.
tar zcvf - / | ssh [email protected] "cat > /backup/fullbackup.tar.gz"Automation
eval $(ssh-agent -a ~/.ssh/my-ssh-agent.sock)
export SSH_AUTH_SOCK=~/.ssh/my-ssh-agent.sock
ssh-add ~/.ssh/id_ed225190 */12 * * * export SSH_AUTH_SOCK=~/.ssh/my-ssh-agent.sock && tar zcvf - / | ssh [email protected] "cat > /backup/fullbackup.tar.gz"The other way around
ssh [email protected] 'tar zvcf - /' > /backup/fullbackup.tar.gzLast updated
Was this helpful?