백업

# mysqldump -u root -p --databases [DB명] > [저장경로/파일명]
mysqldump -u root -p --databases [DB명] > /var/lib/mysql/project_2021-12-07.sql

복원

# mysqldump -u root -p [DB명] < [저장경로/파일명]
mysql -u root -p project < /var/lib/mysql/project_2021-12-07.sql

참고