If I create a partition to backup files in windows before installing Ubuntu, is that partition safe after installing Ubuntu?
Also I plan on replacing Windows 7 with Ubuntu.
Definitively no!
Creating a new partition for backups, then installing Ubuntu on a separate partition will not affect your files in the backups partition. What you will want to be cautious of is creating the partitions, because if done wrong you can lose all of the data on that drive.
My suggestion would be to make your partitions with GParted off the Ubuntu LiveCD.
here is a similar question with instructions on how to do this.
If I have understood your question correctly you can do the following
You can easily install Ubuntu on any partition at install time.
If you want your Data partition to be accessible from Ubuntu please see Mounting Partitions. Although I believe the partitions should mount automatically.
I wouldn't recommend resizing an NTFS partition from within Ubuntu. Gparted is good, but all NTFS support in the linux kernel is reverse-engineered. There's no reason to trust something like a filesystem resize to that when you still have Windows accessible. So My advice for partitioning is that you should use Windows Partitioning tool before installing Ubuntu
Ubuntu will not mess with your partitions. However, partitioning in the installation can be a bit confusing.
Since you want to replace Windows with Ubuntu, you can boot the Ubuntu Live CD, open gparted to format and move partitions, as you see fit.
For example: You can wipe the Windows partition and move the data backup partition to include all contiguous empty space. When you install Ubuntu, let it use that empty space.
Your partition will be safe when installing Ubuntu but even if you did not create a backup partition, your information would still be safe since installing Ubuntu side by side with windows will not affect Windows in any way (except taking a small amount of space for the ubuntu partitions).
The only case I know where you would loose the backup files would be when partitioning the hard drive and a power down would occur. That would be bad luck but not something that would be Ubuntu's fault.
So doing a backup partition or installing it side by side would result in the same thing in terms of safety for the information of Windows.