What to backup
Vikunja does not store any data outside of the database. So, all you need to backup are the contents of that database and maybe the config file.
To create a backup from mysql use the
mysqldump -u <user> -p -h <db-host> <database> > vkunja-backup.sql
You will be prompted for the password of the mysql user.
To restore it, simply pipe it back into the
mysql -u <user> -p -h <db-host> <database> < vkunja-backup.sql
To backup sqllite databases, it is enough to copy the database elsewhere.