Line 10: |
Line 10: |
| |image={{#var:contribname}}.jpg | | |image={{#var:contribname}}.jpg |
| |description_image= {{#var:contribname}} logo | | |description_image= {{#var:contribname}} logo |
− | |maintainer= maintainer | + | |maintainer= Unnilennium |
− | |licence= | + | |licence= GPL |
| |url= https://wiki.contribs.org | | |url= https://wiki.contribs.org |
− | |category= Category you want | + | |category= backup |
− | |tags=File,this,with,a,list,of,tags | + | |tags=backup,usb,disk,rsync,cron |
| }} | | }} |
| | | |
| ===Maintainer=== | | ===Maintainer=== |
| Original contributor : Darell May | | Original contributor : Darell May |
| + | |
| [[User:Unnilennium|Jean-Philippe Pialasse]] | | [[User:Unnilennium|Jean-Philippe Pialasse]] |
| | | |
− | === Version === | + | ===Version=== |
− | <!-- keep this first element as is, you can add some if needed -->
| + | |
| {{#smeversion: {{#var:smecontribname}} }} | | {{#smeversion: {{#var:smecontribname}} }} |
− | {{#smeversion: {{#var:contribname}} }}
| |
| | | |
− | === Description === | + | ===Description=== |
| SME Server implementation of rsync to perform nightly backup to a mounted drive. | | SME Server implementation of rsync to perform nightly backup to a mounted drive. |
| With a server-manage panel | | With a server-manage panel |
| | | |
− | === Installation === | + | /etc/e-smith/events/actions/rsync-backup will be executed at the time configured |
| + | |
| + | in case of disaster, you could use the action /etc/e-smith/events/actions/rsync-restore and the backup disk will be used as a traditional tape to restore from to your server your whole backup. |
| + | |
| + | You can also manually mount the disk and use cli to cherry pick your files. |
| + | |
| + | |
| + | The Reminder is simply a mail sent to admin via the cron report |
| + | |
| + | ===Installation=== |
| <tabs container><tab name="For SME 10"> | | <tabs container><tab name="For SME 10"> |
| yum --enablerepo=smecontribs install {{#var:smecontribname}} | | yum --enablerepo=smecontribs install {{#var:smecontribname}} |
| </tab></tabs> | | </tab></tabs> |
| | | |
− | === Configuration === | + | ===Configuration=== |
| + | |
| + | [[File:Smeserver-rsync-backup2disk.png|thumb|server-manager panel for rsync backup2disk]] |
| you can list the available configuration with the following command : | | you can list the available configuration with the following command : |
− | config show {{#var:contribname}} | + | config show rsync |
| | | |
| Some of the properties are not shown, but are defaulted in a template or a script. Here a more comprehensive list with default and expected values : | | Some of the properties are not shown, but are defaulted in a template or a script. Here a more comprehensive list with default and expected values : |
Line 46: |
Line 57: |
| ! | | ! |
| |- | | |- |
− | |DbName | + | |Exclude |
− | |nextcloud | + | | |
| |string | | |string |
− | |for mysql db | + | | |
| |- | | |- |
− | |DbPassword | + | |Include |
− | |GENERATED | + | |SME default list |
| |string | | |string |
− | |for mysql db | + | | |
| |- | | |- |
− | |DbUser | + | |Mount |
− | |nextcloud | + | |/media/Usbdisk |
| |string | | |string |
− | |for mysql db | + | | |
| |- | | |- |
− | |access | + | |backupTime |
− | |private | + | |23:30 |
− | |private, public | + | |time 24h |
| | | | | |
| + | |- |
| + | |reminderTime |
| + | |14:00 |
| + | |time 24h |
| + | | if empty it will not send alert. |
| |- | | |- |
| |status | | |status |
− | |enabled | + | |disabled |
− | |enabled,disabled | + | |disabled, enabled |
| |} | | |} |
| | | |
| + | [root@sme10rc ~]# config show rsync |
| + | rsync=backupservice |
| + | Exclude= |
| + | Include=/etc/backup-data.d,/etc/e-smith/templates-custom,/etc/e-smith/templates-user- custom, |
| + | /etc/group,/etc/gshadow,/etc/passwd,/etc/samba/secrets.tdb,/etc/samba/smbpasswd,/etc/shadow, |
| + | /etc/ssh,/etc/sudoers,/home/e-smith,/root |
| + | Mount=/media/usbdisk |
| + | backupTime=23:30 |
| + | reminderTime= |
| + | status=disabled |
| + | |
| + | ===fstab=== |
| + | A storage Device needs to be listed in the fstab file to be available for mounting and use as a backup target, as long as device is listed in fstab it will be used by rsync, FS ext3 ext4 or xfs, at a minimum, are supported. |
| + | |
| + | Mount point in fstab must be same as mount point entered in configuration. |
| + | |
| + | /etc/fstab |
| + | #------------------------------------------------------------ |
| + | # BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically |
| + | # by the SME server software. A few entries are updated during |
| + | # the template processing of the file and white space is removed, |
| + | # but otherwise changes to the file are preserved. |
| + | # For more information, see http://www.e-smith.org/custom/ and |
| + | # the template fragments in /etc/e-smith/templates/etc/fstab/. |
| + | # |
| + | # copyright (C) 2002 Mitel Networks Corporation |
| + | #------------------------------------------------------------ |
| + | # |
| + | # /etc/fstab |
| + | # Created by anaconda on Sun Mar 28 18:56:50 2021 |
| + | # |
| + | # Accessible filesystems, by reference, are maintained under '/dev/disk' |
| + | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info |
| + | # |
| + | /dev/mapper/main-root / xfs uquota,gquota 0 0 |
| + | UUID=d52f319b-b06f-42bd-8408-6b3b1aba6731 /boot xfs defaults 0 0 |
| + | /dev/mapper/main-swap swap swap defaults 0 0 |
| + | # the following device added for rsync-backup |
| + | UUID=e5b75a85-5f3d-4db5-9097-f0339f711ab1 /media/usbdisk ext3 defaults,_netdev 0 0 |
| + | |
| + | Following formats for fstab may be used, UUID or LABEL are preferred: |
| + | UUID=WHATEVERUUID /media/backupusb ext3 defaults,_netdev 0 0 |
| + | LABEL=WHATEVERLABEL /media/backupusb ext3 defaults,_netdev 0 0 |
| + | (not recommended ) |
| + | /dev/sdb1 /media/backupusb ext3 defaults 0 0 |
| | | |
| + | UUID or LABEL may be found by using lsblk or blkid as follows: |
| + | [root@sme10rc ~]# lsblk -o NAME,UUID,FSTYPE,LABEL |
| + | NAME UUID FSTYPE LABEL |
| + | sda |
| + | ├─sda1 d52f319b-b06f-42bd-8408-6b3b1aba6731 xfs BOOT |
| + | └─sda2 LUlD4Z-jSfM-rDXi-dnyb-YuJk-HErl-LlHLVg LVM2_member |
| + | ├─main-root 27c5fbcd-2138-4517-b911-2f03998a3aba xfs |
| + | └─main-swap 7547033e-6245-4994-b9ee-161cabeaaf55 swap |
| + | sdb |
| + | └─sdb1 e5b75a85-5f3d-4db5-9097-f0339f711ab1 ext3 |
| + | or |
| + | [root@sme10rc ~]# blkid |
| + | /dev/sda1: LABEL="BOOT" UUID="d52f319b-b06f-42bd-8408-6b3b1aba6731" TYPE="xfs" |
| + | /dev/sda2: UUID="LUlD4Z-jSfM-rDXi-dnyb-YuJk-HErl-LlHLVg" TYPE="LVM2_member" |
| + | /dev/mapper/main-root: UUID="27c5fbcd-2138-4517-b911-2f03998a3aba" TYPE="xfs" |
| + | /dev/mapper/main-swap: UUID="7547033e-6245-4994-b9ee-161cabeaaf55" TYPE="swap" |
| + | /dev/sdb1: UUID="e5b75a85-5f3d-4db5-9097-f0339f711ab1" TYPE="ext3" |
| | | |
− | === Uninstall === | + | ===Uninstall=== |
| yum remove {{#var:smecontribname}} {{#var:contribname}} | | yum remove {{#var:smecontribname}} {{#var:contribname}} |
| | | |
− | === Bugs === | + | ===Bugs=== |
| Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] | | Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] |
| and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}} | | and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}} |
Line 85: |
Line 163: |
| Only released version in smecontrib are listed here. | | Only released version in smecontrib are listed here. |
| | | |
− | {{ #smechangelog: {{#var:smecontribname}} }} | + | {{#smechangelog: {{#var:smecontribname}} }} |
| | | |
| | | |
Line 92: |
Line 170: |
| | | |
| <!-- Please keep there the template revision number as is --> | | <!-- Please keep there the template revision number as is --> |
− | [[contribtemplate::2| ]]
| |
− | [[contriblang:: {{#var:lang}} | ]]
| |