Don’t Underestimate Local Copy

They Can Be Your Savior

If you are a developer like me, surely your work would involve remote-to-local file transfer. Most of the time we would use FTP, even though some are blessed with SVN and CVS facility where files are most of the time in sync and backed up in the repository. However, no matter what method you are using it does not dismiss the importance of keeping your files safely in your local machine. It staggers me that some developers still download their files to the “desktop” folder, edit them and then delete them. When things go awry with the server, they are helpless.

problem, backup is your friendA server no matter how well built is still a machine and machines have its down times. Your files are not untouchable in the server, they can get corrupted or deleted. Sometimes it is an innocent act of your fellow developers overwriting a few files and other times, malicious users. At this point some would say: “Wait! a server should have its backup, its the responsibility of the administrators”; in a sense yes, but in reality shared servers (with the exception of a few) keep your backup only at most 3 days, some even hardly backup at all. The point is, customers do not care much about the technical details, they just want their applications running well. So we developers have to do what we can to ensure maximum service delivery.

So, what can we do? Here’s a few tips that I’d like to share:

  1. If you are using cPanel, there is a backup functionality which will do a full backup (files, databases, etc) into your private folder in your server, outside the public html folder. Use that, and then download the backup. There’s not much point having a backup in your server if the server is down.
  2. In a Plesk server, there is also a backup functionality. Again this is a manual backup, you have to run it yourself. Plesk backup is slightly different, where with cPanel backup files you can decompress it and use the files individually, in Plesk the backup is meant for full restoration. You have to upload the file back to the server and execute the restore procedure. There are tools to decompress Plesk backup manually if you do a quick search in Google.
  3. When you are patching or modifying, download all the files anew first, then work on it. Therefore if something does happen at least you still have the latest copy.
  4. Organize your local machine; don’t put your files in your desktop. Have a work folder for all your projects.
  5. Backup your work folder. If you are using Windows you can use Sync Toy for simple backups, in Apple machines you can always use the Time Machine.
  6. Get a server with SVN capability. This makes things much safer and simpler in some sense; at least there are less chances that your fellow developer overwrites your work with an older version of a file.

That being said, even though the above are simple, some people just won’t do it. Remember, it only takes less than 10 minutes to save your data and keep your customers happy.

Stay tuned for more updates and tips and tricks.

Leave a Reply