linux_wiki:rsync_backup_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:rsync_backup_script [2014/11/19 21:52]
billdozor created
linux_wiki:rsync_backup_script [2019/05/25 23:50] (current)
Line 1: Line 1:
 ====== Rsync Backup Script ====== ====== Rsync Backup Script ======
 +
 +**General Information**
  
 This script backs up a home folder to a backup folder. This script backs up a home folder to a backup folder.
Line 5: Line 7:
 Lastly, it removes log files that were last modified more than 7 days ago. Lastly, it removes log files that were last modified more than 7 days ago.
  
-== backuphome.sh ==+**Checklist** 
 +  * Distro(s): Any 
 +  * Other: List of source folders to backup (/home/bill/ in this example) 
 +  * Other: Storage mounted somewhere to backup to (/backups/ in this example) 
 + 
 +---- 
 + 
 +===== The Script =====
  
-<code>+<code bash backuphome.sh>
 #!/bin/bash #!/bin/bash
  
Line 23: Line 32:
 </code> </code>
  
-== Call Backup Script with Cron == +==== Call Backup Script with Cron ==== 
-Edit your crontab: +1) Edit your crontab: 
-<code>+<code bash>
 crontab -e crontab -e
 </code> </code>
  
-and schedule the script to be run every night at 11:00pm: +2) Schedule the script to be run every night at 11:00pm (for example) 
-<code>+<code bash>
 # minute (m), hour (h), day of month (dom), month (mon), # minute (m), hour (h), day of month (dom), month (mon),
 # and day of week (dow) or use '*' in these fields (for 'any'). # and day of week (dow) or use '*' in these fields (for 'any').
  • linux_wiki/rsync_backup_script.1416451930.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)