V13
Αγγλικά  Ελληνικά 
Projects vbackup Configuration

The begginer's way

There is a wizard script that will help you create basic configuration files. Most probably you will want to use it for the first time. For more advanced configuration and fine-tunning you will have to use the CLI interface and/or adjust the configuration files yourself (read bellow).

To launch the wizard run:
# vbackup-wizard

and just answer its questions. The wizard also serves as an introduction.

Note that this will only create trivial backups. It is really suggested to find use the next method.
 

The CLI way

Let's assume you want to:

  • Backup to an NFS mounted space
  • Perform backup of two partitions using xfsdump (full and incremental)
  • Perform backup of directories using tar (full and incremantal)
  • Perform mysql and pgsql backup

Run the following and answer the questions properly. You change your config later by editing config files by hand.

  1. First create the config files:
    # vbackup --rc --add 00-remote.nfsmount
    # vbackup --rc --add 10-full.mysql
    # vbackup --rc --add 10-full.pgsql
    # vbackup --rc --add 20-level0.tar
    # vbackup --rc --add 20-level5.tar
    # vbackup --rc --add 30-level0.xfsdump
    # vbackup --rc --add 30-level5.xfsdump
    # vbackup --rc --add 99-remote.umount
  2. Create the two backup strategies:
    # vbackup --rc --init 0
    # vbackup --rc --init 5
  3. Populate the strategy 0:
    # vbackup --rc --enable 00-remote.nfsmount 0
    # vbackup --rc --enable 10-full.mysql 0
    # vbackup --rc --enable 10-full.pgsql 0
    # vbackup --rc --enable 20-level0.tar 0
    # vbackup --rc --enable 30-level0.xfsdump 0
    # vbackup --rc --enable 99-remote.umount 0
  4. Populate the strategy 5:
    # vbackup --rc --enable 00-remote.nfsmount 5
    # vbackup --rc --enable 10-full.mysql 5
    # vbackup --rc --enable 10-full.pgsql 5
    # vbackup --rc --enable 20-level5.tar 5
    # vbackup --rc --enable 30-level5.xfsdump 5
    # vbackup --rc --enable 99-remote.umount 5
  5. Check the configuration:
    # vbackup --check 0
    # vbackup --check 5
  6. Perform a level 0 backup
    # vbackup 0
  7. Perform a level 5 backup
    # vbackup 5

The expert's way

Let's assume the same scenario as above

  1. Go to /etc/vbackup and create a folder named rc.d. This will hold all the configuration scripts.
  2. Copy from the samples directory ($prefix/share/vbackup/samples) the following scripts to rc.d:
    • sample.nfsmount
    • sample.nfsmount
    • sample.umount
    • sample.xfsdump
    • sample.mysql
    • sample.pgsql
    • sample.umount
  3. Rename sample.nfsmount to remote.nfsmount. (Any name with the extension .nfsmount will do) and edit it. Change the values of the variables to fit your needs.
  4. Rename sample.umount to remote.umount and edit it. Just set the mountpoint to umount.
  5. Rename sample.mysql to full.mysql and edit it. Read the note at the top of the script and set variables as needed.
  6. Rename sample.pgsql to full.pgsql and edit it.
  7. Copy sample.tar to level0.tar an edit it. Set the level to 0.
  8. Rename sample.tar to level5.tar and edit it. Set the level to 5.
  9. Copy sample.xfsdump to level0.xfsdump and edit it. Set the level to 0.
  10. Rename xfsdump to level5.xfsdump and edit it. Set the level to 5.
  11. Create two directories named backup.0 and backup.5 under /etc/vbackup.
  12. Enter backup.0 and create softlinks to the desired configuration files:
    # ln -s ../rc.d/remote.nfsmount 00-remote.nfsmount
    # ln -s ../rc.d/remote.umount 99-remote.umount
    # ln -s ../rc.d/full.mysql 10-full.mysql
    # ln -s ../rc.d/full.pgsql 10-full.pgsql
    # ln -s ../rc.d/level0.tar 20-level0.tar
    # ln -s ../rc.d/level0.xfsdump 30-level0.xfsdump
  13. Enter backup.1 and create softlinks:
    # ln -s ../rc.d/remote.nfsmount 00-remote.nfsmount
    # ln -s ../rc.d/remote.umount 99-remote.umount
    # ln -s ../rc.d/level5.tar 20-level5.tar
    # ln -s ../rc.d/level5.xfsdump 30-level5.xfsdump
  14. Copy to backup.0 and backup.1 the vbackup.conf.sample from the samples directory. Rename it to vbackup.conf and edit it as needed.
  15. Check the configuration using:
    # vbackup --check 0
    # vbackup --check 5
  16. Perform a level 0 backup:
    # vbackup 0
  17. Perform a level 5 backup:
    # vbackup 5