Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

Full DB Backup

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
surus
Posts: 5
Joined: Sun Apr 15, 2018 12:20 pm

Os: CentOS 6x
Web: apache + nginx
Full DB Backup
  • Quote

Post by surus » Sat Apr 21, 2018 6:20 am

Hello,

How I can create the full db backup?
Our db is around 3GB. If we use the inbuilt vestacp backup, it will be done every night, but the backup files size is around 70MB only.
I mean this cron: sudo /usr/local/vesta/bin/v-backup-users

I need the full backup, that can be used on each other server to restore all user data including full web and full db server.
Please help.
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: Full DB Backup
  • Quote

Post by grayfolk » Thu Jun 11, 2020 1:41 pm

surus wrote: ↑
Sat Apr 21, 2018 6:20 am
Hello,

How I can create the full db backup?
Our db is around 3GB. If we use the inbuilt vestacp backup, it will be done every night, but the backup files size is around 70MB only.
I mean this cron: sudo /usr/local/vesta/bin/v-backup-users

I need the full backup, that can be used on each other server to restore all user data including full web and full db server.
Please help.
You can use mysqldump: https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html

Code: Select all

Simple backup:
mysqldump -u USER -pPASSWORD DATABASE > /path/to/file/dump.sql

Schema only
mysqldump --no-data - u USER -pPASSWORD DATABASE > /path/to/file/schema.sql

Specufy tables
mysqldump -u USER -pPASSWORD DATABASE TABLE1 TABLE2 TABLE3 > /path/to/file/dump_table.sql

Gzipped backup
mysqldump -u USER -pPASSWORD DATABASE | gzip > /path/to/outputfile.sql.gz

Backup filename with current datetime
mysqldump -u USER -pPASSWORD DATABASE | gzip > `date +/path/to/outputfile.sql.%Y%m%d.%H%M%S.gz`
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password