Difference between
modified post 70f1324 by Anonymous on Mon 2nd Mar 2015 23:19
original post 430a5 by Anonymous on Mon 2nd Mar 2015 23:14
Download diff
Show
old version |
new version |
both versions
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | ||
| 3 | 3 | # Set backup location here | |
| 4 | 4 | bak=$1 | |
| 5 | 5 | timestamp=$(date +%F_%T%z) | |
| 6 | 6 | ||
| 7 | 7 | # Make a timestamped directory there. | |
| 8 | 8 | mkdir -v "$bak"homeprofile_backup_"$timestamp" | |
| 9 | 9 | ||
| 10 | + | # Make what has been bade by mkdir and put that into a variable. | |
| 10 | 11 | "$bak"homeprofile_backup_"$timestamp"=timedir | |
| 11 | 12 | ||
| 13 | + | # For this, blaah.txt has to exist in your directory, that one is supposed to get copied over. | |
| 12 | 14 | rsync -avp --partial --progress --human-readable blaah.txt "$timedir" | |
| 13 | 15 |
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
script.kpaste.net RSS