Using Coda, Transmit, Dropbox, and Dropbox's packrat feature, here's what I do:
- Create a new folder in my local Dropbox directory for each new project.1
- Create a new 'Site' in Coda, and set the folder from step 1 as the site's 'Local Root' folder.
- Set the 'Remote Root' to the identical folder on the server.
- Work on all files locally, and use Coda's 'Publish All' feature to push local file changes to the remote site periodically for testing.
What this gives me
- Automatic backups of all files to Dropbox with automatic unlimited versioning. (Packrat gives you the unlimited versioning, but the standard 30 day versioning history might be enough for many). Every time I save a file it's automatically saved to Dropbox as a new version. I can rollback any file at any time via the Dropbox Web interface. I rarely use this, but it's nice to have it as it's saved my skin a few times.
- 'Proper' version control. (Subversion support is now built into Coda, and there are Git plugins.)
- Two-way syncing with Transmit. If I suspect remote files have changed between edits, I use Transmit's mirroring features to sync remote changes from the server to my local machine. This is not a substitute for using more structured version control for code synchronisation and deployment, but for small projects and one-man jobs, it often suffices.
- One-window general development with Coda (which supports direct remote file editing without needing to set up a new Site if you need it, as does Transmit.)
From your wishlist, that gives you version control, automatic code backups, and remote file editing if you need it. (For safety I recommend working on the Dropbox-stored local copy and publishing changes to the server from time to time so that you maintain both a local and Dropbox backup automatically.)
What about database backups?
Although I love Navicat for MySQL database tinkering, I've not found a Mac-native automated database backup solution that I've been happy with. You could certainly hack together something using Automator/th3 aw3s0mE p0w3r of Unix, but I don't like to think that essential backups depend on my work machine being switched on (it's a laptop, after all!), so I found another solution.
I use Hostgator's Site Auto Backup. It's a hosted service that lets you backup any website that uses the cPanel control panel (most shared hosting sites) with minimal configuration. It backs up files, databases, emails and logs every day. If your site doesn't use cPanel, it can back up via FTP and MySQL connections directly, which requires only a little more configuration.
Site Auto Backup costs about $20/year if you pay annually, and I think it's worth it for peace of mind. The admin interface could do with a bit of a refresh (see below), but it works as advertised and you can backup any site with it, not just Hostgator ones. There's no limit to the number of sites you can backup -- you just pay for storage over the provided 1GB -- so I backup all my client sites this way too. I don't charge for this as I consider it a basic essential service that's just part of the job, but you could bill clients for the service if you wanted to.
Notes on Dropbox directory structure:
1: I have a single directory in my Dropbox folder called 'Sites', with subdirectories for each project named using the project's domain name: 'theproject.com' or 'beta.theproject.com' etc. If I'm starting a new site, the local site folder will be empty. If I'm working on an existing site, I will download the remote root directory to the local folder. (If I'm working on a WordPress site, I download only the
themes folder to save time.)
If I have multiple sites hosted on one server, I create several folders locally and several separate Sites in Coda (with the same FTP details).