Rsync -avz -e 'ssh -o ConnectTimeout=10' /home/maurice/dev/ maurice-Laptop. # Backup remotely (if the server is available) Rsync -av /home/maurice/dev/ /media/maurice/SSD/dev/ Personally, since both scripts run every five minutes, I'd put both commands into a single script, #!/bin/bash (If you'd had this you would have seen an error of the style maurice: command not found.) One option is to append error logging: */5 * * * * /etc/local/rsyncLocal_script >/tmp/rsyncLocal.log 2>&1 In both cases you should consider capturing the output of the command. The software Grsync is available for installation on Linux. For example, create a snippet file /etc/cron.d/mybackups and put the lines - including maurice -there. If that really isn't possible you need to use a system crontab (as distinct from root's crontab). ![]() Just run them as maurice in the first place. There's no need to put these in a root crontab only for cron to then change its permissions to run as maurice. Remove the entries from root's crontab and put them into maurice's crontab: #Local Backup Script The problem here is that you are using the seven field layout for crontab entries in a file that expects only six. ![]() Rsync -e 'ssh -p 22' -avzp /home/maurice/dev/ after that i really don't know what to do else */5 * * * * maurice /etc/local/rsync_scriptĢ.if i run the remote script manually it does workģ.i can ssh in both the local and remote computer without the need of a password the ssh key of both pc are added to /home/maurice/.ssh/authorized_keys */5 * * * * maurice /etc/local/rsyncLocal_script Here is my crontab File #Local Backup Script It is a backup program that uses rsync behind the scenes. One of the Grsync settings dialogs, The luckyBackup program is much more than a simple wrapper for rsync. It provides easy access to the rsync options and adds only a limited set of new functionality. Rsync -e 'ssh -p 22' -avzp /home/maurice/dev/ maurice-Laptop.local:/home/maurice/dev/ The Grsync program concentrates on being a visual wrapper for rync. Rsync -avz /home/maurice/dev/ /media/maurice/SSD/dev/ Grsync is a simple graphical user interface for Rsync. No worries There are a few graphical frontend tools for Rsync available. ![]() Local Destination: /media/maurice/SSD/dev/ If you're a new to Linux, you may find it difficult to understand all Rsync options and flags. My script are saved in the folder /etc/local/ I'm trying to make an automatic backup system that would sync 2 folders every 5 minutes with Rsync and Crontab both locally and remotely
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |