![]() ![]() Lsyncd has the feature of syncing from one source to multiple targets. Lsyncd aggregates events up to 1000 separate events, or a 15-second delay before synchronizing, whichever happens first, so our changes may not be synced immediately. $ echo "This is line 2" > sample/source/file01.bin Grsync can also work with SSH, making the data transfers. Its an excellent way to make sure your important data is backed up, whether to another internal location or external destinations, like USB hard disks or Windows shares. If we edit files in the source directory, lsyncd will automatically reflect it in the target directory: $ cat sample/source/file01.bin Its simple, fast, robust, exactly what you want from a backup utility. $ lsyncd -rsync /home/baeldung/sample/source /home/baeldung/sample/targetġ5:41:03 Normal: - Startup, daemonizing. The command above will copy/mirror the source directory recursively to the target directory: $ tree sample Update yum database with yum using the following command. In this tutorial we discuss both methods but you only need to choose one of method to install grsync. To install luckyBackup in Ubuntu, use the following command: sudo apt-get install. To install Grsync in Manaro use this command: sudo pacman -Syu grsync. ![]() To install Grsync in Fedora, use this command: sudo dnf install grsync. ![]() If the target directory is on a different machine: $ lsyncd -rsyncssh /home/baeldung/sample/source/ target-path/ We can use yum or dnf to install grsync on CentOS 7. To install Grsync in Ubuntu, use this command: sudo apt-get install grsync. Let’s set up a local lsync: $ lsyncd -rsync /home/baeldung/sample/source /home/baeldung/sample/target Our ~/sample/source directory will now sync to ~/sample/target directory every minute. Rsync can copy locally, to and from another host over any remote shell, or to and from a remote rsync daemon. The script removed the files in the target directory successfully. Rsync is a fast and powerful file copying tool. Let’s delete a file ( ~/sample/source/file01.bin) from the source to see if it will also delete the same file from the target: $ rm sample/source/file01.bin ![]()
0 Comments
Leave a Reply. |