If I have two files in my database (mdf & ndf), when I do a backup of the database with the statement:
backup database mydb;
are both the two files are backed up?
If I have two files in my database (mdf & ndf), when I do a backup of the database with the statement:
backup database mydb;
are both the two files are backed up?
Yes. Details here: Backup Overview (SQL Server)
This is the section relevant for you:
Full backup
A full backup contains all the data in a specific database or set of filegroups or files, and also enough log to allow for recovering that data.
You should always test the backup (ideally by performing a restore to another location) to ensure you can recover your data in the event of a disaster.