uid/gid
).
Ostrava ssh.du4.cesnet.cz
Jihlava ssh.du5.cesnet.cz
Ostrava ssh6.du4.cesnet.cz
In a GNU/Linux is rsync
installation available directly from the package manager (in most distributions).
Example of use rsync for backup directory tree folder
to account user
server host
into directory path
(rsync format):
rsync -av folder user@host:path
Example of restore directory tree folder
from account user
server host
into working directory.
rsync -av user@host:path/folder .
user@host:path
)rsync
. rsync
is suitable for storing synchronized backup file system with data ownership and access rights, where such data is necessary for files to keep.rsync
with te same parameters setting --numeric-ids
and --fake-super
uid/gid
).uid/gid
).grsync
in Windows in this variant - in tests were appeared incorrect mapping users uid/gid
.If you break these conditions it will very likely leads to inconsistent data about files ownership.
--numeric-ids
--rsync-path
--fake-super
: --rsync-path="rsync --fake-super"
--fake-super
--super
--fake-super
in --rsync-path
).
Example of use rsync for backup directory tree folder
to account user
server host
into directory path
:
rsync -av --numeric-ids --rsync-path="rsync --fake-super" folder user@host:path
Example of restore directory tree folder
from account user
server host
into working directory.
rsync -av --numeric-ids --rsync-path="rsync --fake-super" user@host:path/folder .
Example of back up and restore directory of user Adminstrator
in Windows:
rsync -av --numeric-ids --rsync-path="rsync --fake-super" /cygdrive/c/Documents\ and\ Settings/Administrator user@host:path
I you are doing restore in Windows you may need additional parameter --super
for proper recovery of information about files ownership and access rights:
rsync -av --numeric-ids --super --rsync-path="rsync --fake-super" user@host:path/ /cygdrive/c/Documents\ and\ Settings/restore
Notation for remote location
user@server:path
where:
user
… username of the account which is used to access data storage.server
… domain name of data storage server. path
… relative path (relate to the user's home directory) in the file system data storage.
Ostrava ssh.du4.cesnet.cz
Jihlava ssh.du5.cesnet.cz
Ostrava ssh6.du4.cesnet.cz
Example:
user@ssh.du4.cesnet.cz:VO_storage-tape_tape/zalohy/1205-kveten
rsync
special purpose:To check the integrity of your files after transfer you can use Hasher app, which is described in the following guide.
Website of the project rsync
: http://rsync.samba.org/
Website of the project Grsync
: http://www.opbyte.it/grsync/
Website of the project Grsync
for Windows: http://grsync-win.sourceforge.net/
Website of the project Grsync
for MacOS X: http://grsync-mac.tuxfamily.org/?lang=en
The Network-attached storage (NAS) from Synology is implicitly communicating via Rsync process which is not running on the server side due to security reasons. It is possible to do backups from NAS Synology via Rsync by switching the interface from GUI to CLI and using standard SSH / rsync via script which will be called by cron. Please note that the shell in NAS Synology is not bash, sh, tcsh, csh … but ash.
#!/bin/ash LOG_FILE=/var/log/backup_`date '+%F'`.log LOG_FILE_ERR=/var/log/backup_errors_`date '+%F'`.log echo "`date '+%b %d %T'` ==== Start of transmission ====" >> $LOG_FILE rsync -a --exclude="[#]recycle/" /volume1/backup service_account@ssh.duX.cesnet.cz:~/VO_nazev-tape_tape/ 1>> $LOG_FILE 2>> $LOG_FILE_ERR RETURN_CODE=`echo $?` echo "`date '+%b %d %T'`==== End of transmission ====" >> $LOG_FILE # Back up logs as well rsync -a /var/log/backup* service_account@ssh.duX.cesnet.cz:~/VO_nazev-tape_tape/
CESNET, z. s. p. o.
Generála Píky 26
16000 Prague 6
Tel: +420 234 680 222
Fax: +420 224 320 269
info@cesnet.cz
Tel: +420 234 680 222
GSM: +420 602 252 531
Fax: +420 224 313 211
support@cesnet.cz