CategoryScripts

Expect scripts

Expect is an extension to TCL scripting that can automate interactions with programs that expose a text terminal interface. This is useful for situations where you wish to automate a task but encounter certain prompts that cannot be bypassed.

In the example below we will use a password as the prompt we wish to programmatically bypass when authenticating to an sftp server. Then we will copy all the local files to a destination directory and then purge the original copies.

Continue reading

Perform incremental style backups using rysnc and hard links

I came across an insanely educational blog entry by Mike Rubel which described how to create automated snapshot style backups using rsync. Below is my interpretation of his method which I currently use to perform my own backups.

With this simple but powerful script you can perform incremental backups using nothing but rsync and symbolic linking.

We will go into detail within each step to describe exactly what is being done. For this post to make sense to the reader it is best read from the bottom up  starting at rsync -avi –delete…

Continue reading

© 2020 revelset

Theme by Anders NorénUp ↑