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
Next revision Both sides next revision
linux_wiki:rsync_backup_script [2014/11/20 19:28]
127.0.0.1 external edit
linux_wiki:rsync_backup_script [2015/03/09 22:09]
billdozor
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** 
 +  * List of source folders to backup (/home/bill/ in this example) 
 +  * Storage mounted somewhere to backup to (/backups/ in this example) 
 + 
 +---- 
 + 
 +===== The Script =====
  
-<code>+<code bash file backuphome.sh>
 #!/bin/bash #!/bin/bash
  
Line 23: Line 31:
 </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.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)