The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 22: | Line 22: | ||
If you run this yourself you'll need to change the "shebang" line referencing bash, and the backupdir. | If you run this yourself you'll need to change the "shebang" line referencing bash, and the backupdir. | ||
<pre> | <pre>#!/opt/homebrew/bin/bash -x | ||
#!/opt/homebrew/bin/bash -x | |||
backupdir='/Volumes/home/Misc_Backups/prolewiki' | backupdir='/Volumes/home/Misc_Backups/prolewiki' | ||
if [[ ! -d ${backupdir} ]]; then | if [[ ! -d ${backupdir} ]]; then | ||
echo "Cannot access backup directory \`${backupdir}\`, | echo "Cannot access backup directory \`${backupdir}\`, is nas2 mounted?" 1>&2 | ||
exit 2 | exit 2 | ||
fi | fi | ||
time rsync -ave 'ssh -p 22022' --delete root@www.prolewiki.org:/home/prole/public_html/ ${backupdir}/public_html/ 2>&1 | tee ${backupdir}/public_html_rsync.log | time rsync -ave 'ssh -p 22022' --delete root@www.prolewiki.org:/home/prole/public_html/ ${backupdir}/public_html/ 2>&1 | tee ${backupdir}/public_html_rsync.log | ||
time rsync -ave 'ssh -p 22022' --delete root@www.prolewiki.org:/root/databases/ ${backupdir}/database/ 2>&1 | tee ${backupdir}/databases_rsync.log | time rsync -ave 'ssh -p 22022' --delete root@www.prolewiki.org:/root/databases/ ${backupdir}/database/ 2>&1 | tee ${backupdir}/databases_rsync.log</pre> | ||