Browse Source

Added: Ubuntu and 64-bit specific paths, Changed: rearranged order: server configuration should be before user creation

master
Hannes Riehl 8 years ago
parent
commit
758e8af7a3
  1. 28
      README.md

28
README.md

@ -15,6 +15,16 @@ rs-backup-suite is split into two parts: a client part for pushing the backup to
### Server
For the server part simply copy the contents of the `server` directory to your root directory and all the necessary files will be in place. Make sure that you copy the file permissions as well! Furthermore make sure that `/usr/local/bin` and `/usr/local/sbin` are in your `$PATH` environment variable as root. Finally rename the file `/usr/local/etc/server-config.example` to `/usr/local/etc/server-config`.
#### Tweaking the configuration file
The configuration file is `/usr/local/etc/server-config`. There you can configure the following directives:
* `BACKUP_ROOT`: The directory under which the home directories of the backup users are stored. The default is `/bkp`
* `FILES_DIR`: The directory under which the actual backups are kept (relative to the backup user's home directory). The default is `files`.
* `SET_QUOTA`: Whether to set disk quota for the users or not (for Ext3/4 file systems). Default is `false`.
* `QUOTA_SOFT_LIMIT`, `QUOTA_HARD_LIMIT`, `QUOTA_INODE_SOFT_LIMIT`, `QUOTA_INODE_HARD_LIMIT`: The individual limits for disk quota. Ignored, if `SET_QUOTA` is `false`.
**WARNING:** Adjust these settings *before* you create backup users, because they won't be re-applied for already existing users!
#### Adding a backup user
A backup user is an unprivileged UNIX account on the server. Normally each user on each client has one corresponding backup user which he uses to log into the NAS. A backup user can be created by running
@ -42,6 +52,12 @@ rs-backup-suite can chroot backup users into the backup home base directory. For
/usr/share/perl5 /bkp/usr/share/perl5 none bind 0 0
/dev /bkp/dev none bind 0 0
**NOTE:** In Ubuntu the perl modules are located at `/usr/share/perl`.
On a 64-bit system you may need to add this to your `/etc/fstab`:
/lib64 /bkp/lib64 none bind 0 0
Then add this to the end of your `/etc/ssh/sshd_config`:
Match Group backup
@ -51,16 +67,6 @@ and restart OpenSSH. Your backup users are now chrooted into `/bkp`.
**NOTE:** When using a chroot environment and you change anything in your user configuration (e.g. the username) you need to run `rs-update-passwd` or your user might not be able to log in anymore.
#### Tweaking the configuration file
The configuration file is `/usr/local/etc/server-config`. There you can configure the following directives:
* `BACKUP_ROOT`: The directory under which the home directories of the backup users are stored. The default is `/bkp`
* `FILES_DIR`: The directory under which the actual backups are kept (relative to the backup user's home directory). The default is `files`.
* `SET_QUOTA`: Whether to set disk quota for the users or not (for Ext3/4 file systems). Default is `false`.
* `QUOTA_SOFT_LIMIT`, `QUOTA_HARD_LIMIT`, `QUOTA_INODE_SOFT_LIMIT`, `QUOTA_INODE_HARD_LIMIT`: The individual limits for disk quota. Ignored, if `SET_QUOTA` is `false`.
**WARNING:** Adjust these settings *before* you create backup users, because they won't be re-applied for already existing users!
#### Changing the rotation options/backup levels
To change how many increments of which level are kept, edit the file `/bkp/etc/rsnapshot.global.conf`. This is the global configuration file for rsnapshot which will be included in each user-specific configuration. There you can tweak the names and numbers for all backup levels.
@ -108,4 +114,4 @@ Be aware that both access methods are strictly read-only! Write access is only g
rsync -a -e ssh backupuser@remotehost::push/destination/path /source/path
## Side note
Because rs-backup-suite uses rsync for the client-server communication you don't necessarily need both parts. As long as you have a working rsync server on your NAS you can use the client script to push files to it. On the other hand you can use the rs-backup-suite server part with any other rsync client, as well.
Because rs-backup-suite uses rsync for the client-server communication you don't necessarily need both parts. As long as you have a working rsync server on your NAS you can use the client script to push files to it. On the other hand you can use the rs-backup-suite server part with any other rsync client, as well.
Loading…
Cancel
Save