making backups automatically

Discussion in 'Programming/Scripts' started by fweijers, Aug 27, 2009.

  1. fweijers

    fweijers New Member

    Hi,

    I'm looking for an rsync command with the following features:
    - From specified directories copy new & changed files to destination.
    - Do not synchronise deletions.

    Which attributes are needed on the rsync command?

    Purpose (for those interested)
    I'm going to use this in my dual-bay NAS (D-LINK DNS-323).
    This is an example of what I have running now:
    rsync -aivx /mnt/HD_a2/FOTOS /mnt/HD_b2/BACKUP

    This is the scripting and HOWTO of the backup system for this NAS.
    http://wiki.dns323.info/howto:backup
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Don't use the --delete switch. For more details, see
    Code:
    man rsync
     
  3. fweijers

    fweijers New Member

    Thanks. I just found something very explanatory:

    http://www.cyberciti.biz/faq/use-rsync-to-backup-directory/

    indeed you are correct: :)
    Assuming that USB pen or external USB hard disk is mounted at /mnt/usbpen, enter the following command to backup (sync) new files and changes to existing files but don't remove files in backup directory:
    $ rsync -au /home/tom /mnt/usbpen

    To delete files in backup directory that no longer exist in directory being backed up, enter:
    $ rsync -au --delete /home/tom /mnt/usbpen
    [/SIZE]
     
: rsync backup

Share This Page