linux_wiki:rsync_backup_script

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:rsync_backup_script [2014/11/24 22:34]
billdozor
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 bash file backuphome.sh>+<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 bash> <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 bash> <code bash>
 # minute (m), hour (h), day of month (dom), month (mon), # minute (m), hour (h), day of month (dom), month (mon),
  • linux_wiki/rsync_backup_script.1416886458.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)