Skip to content

Commit 93f68b9

Browse files
committed
update link
1 parent 9d4aac4 commit 93f68b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_posts/2024-09-29-crontab-with-rsync.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ comments_id: 6
1010

1111
I would like to back up my laptop home directory to a server every night at 12. As such, even I did something stupid like the other day, `rm -rf * ` with a `for` loop includeing `cd ..`.
1212

13-
The task is very easy, just create a back.sh script and include the rsync command in (see this [post](2024-03-05-rsync.md) for details). Then, you use `crontab -e` to add one additional line at the bottom, e.g. `0 0 * * * /home/yourname/back.sh`
13+
The task is very easy, just create a back.sh script and include the rsync command in (see this [post](https://weiguangcui.github.io/2024-03-05-rsync/) for details). Then, you use `crontab -e` to add one additional line at the bottom, e.g. `0 0 * * * /home/yourname/back.sh`
1414

1515
However, you need to make sure your script is running totally fine. Do Not naively believe that `./home/yourname/back.sh` in your terminal is fine, your `crontab` task will be running OK. `crontab` includes different environments... So, you have to make sure your script as specific as possible, e.g. you may want to avoid any alias in your .bashrc file. But most import of all, test and verify it by replace the line in `crontab` to
1616

@@ -27,7 +27,7 @@ rsync error: unexplained error (code 255) at io.c(231) [sender=3.2.7]
2727
```
2828

2929
If you want to know more about this error, add `vvv` to your `rsync` input parameters in the `/home/yourname/back.sh` file.
30-
My problem is solved by adding this line to `./home/yourname/back.sh` file, note NOT adding it to the `crontab` tasks:
30+
<**SOLUTION**> My problem is solved by adding this line to `./home/yourname/back.sh` file, note NOT adding it to the `crontab` tasks:
3131
```
3232
export SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
3333
```

0 commit comments

Comments
 (0)