hypefert.blogg.se

Automate grsync
Automate grsync












Rsync -avz -e 'ssh -o ConnectTimeout=10' /home/maurice/dev/ maurice-Laptop. # Backup remotely (if the server is available)

automate grsync

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. 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.

automate grsync

Rsync -e 'ssh -p 22' -avzp /home/maurice/dev/ after that i really don't know what to do else

AUTOMATE GRSYNC PASSWORD

*/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 ps1 file (powershell) with a command like wsl rsync. Rsync -e 'ssh -p 22' -avzp /home/maurice/dev/ maurice-Laptop.local:/home/maurice/dev/ I used it to make a backup system, not fully done yet, but in regards of the automation: You can create a. Rsync -avz /home/maurice/dev/ /media/maurice/SSD/dev/ Local Destination: /media/maurice/SSD/dev/ My script are saved in the folder /etc/local/

automate grsync

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












Automate grsync