P
P
PlatinumArcade2013-02-04 20:01:48
System administration
PlatinumArcade, 2013-02-04 20:01:48

How to set up a cumulative Backup on a remote VPS?

Can you tell me how to write a script for a storage backup of a server on a remote VPS? Everywhere CentOS.

Those. so that only new and changed files are copied daily. I can't gobble up anything like this...

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
ikhotsko, 2013-02-04
@PlatinumArcade

Use rsync with the --link-dest option - the first backup copies all files, the next only new and changed ones.
The link to the article indicated by script88 should help you write your own script, the main thing is to refuse to use ssh - this greatly slows down the transfer, rsync has built-in authorization mechanisms through files.

B
Boris Syomov, 2013-02-04
@kotomyava

Rsnapshot(http://www.rsnapshot.org/) for example. And collect via ssh from the remote server using key authorization.

S
script88, 2013-02-04
@script88

Everything is done very simply through a bash script. which archives the data and uploads it to the backup server. There is even a whole article on Habré Put the script in the
PROFIT cron

V
Vlad Zhivotnev, 2013-02-04
@inkvizitor68sl

#!/bin/bash

set_vars () {
chroot_dest=/
#db_list=$(chroot ${chroot_dest}/ /usr/bin/mysql -e 'show databases;' | egrep -v '("+--"|Database|mysql|information_schema|performance_schema)')
backupdate=$(date +%Y%m%d-%H%M)
backup_dest=/backup2/dom0
backup_dest_chroot=${backup_dest}/rootfs/
backup_dest_mysqldumps=${backup_dest}/mysqldumps/
exclude_list=/etc/backup/exclude-dom0.list
}

rdiff_backup () {
#set -x
/usr/bin/rdiff-backup --print-statistics --exclude-sockets --preserve-numerical-ids --exclude-globbing-filelist ${exclude_list} ${chroot_dest} ${backup_dest_chroot}
}

set_vars
rdiff_backup


Something like that. Only your dest, respectively, will be different.

R
Riateche, 2013-02-06
@Riateche

I like duplicity .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question