[Steps by Steps ]Migrate Drupal 7 from web hosting to google cloud platform

1)backup the mysql database in backup.sql or backup.sql.gz, notes: please clear the cache_form table first to reduct the table size which is huge(phpmyadmin / mysql workbench)

(take a look on this : why cache_form is huge)

2)backup the sites folder with files in web host

3)add database user in phpmyadmin of cloud platform in old database(could be found in setting.php in sites/default)

4)upload the backup.sql or backup.sql.gz via phpmyadmin

5)upload the sites folder via sftp to /home/your_username_folder (FTP client -> Transmit)

6)update the sites folder ownership to www-data

7)cp sites folder to /drupal

8)Finish !!! (Not Yet if you need to consider domain name)

Reference :
http://www.linuxquestions.org/questions/linux-software-2/command-line-chown-command-recursively-on-invisible-directories-840282/
http://www.arthurtoday.com/2010/09/ubuntu-cp-mv.html

Drupal 7 cache_form table is too huge

After long run, the cache form table become huge,

Find it out in mysql workbench or phpmyadmin
SELECT table_name “Tables",
( data_length + index_length ) / 1024 /
1024 “Table Size in MB",
( data_free )/ 1024 / 1024 “Free Space in MB"
FROM information_schema.TABLES
where table_schema="your_database_name"
Order by (data_length + index_length) DESC;
DELETE FROM {cache_form} WHERE expire < now();

DELETE FROM drupal_e.cache_form WHERE (expire <> 0) AND (expire < UNIX_TIMESTAMP(NOW()));

////or using drupal module

https://www.drupal.org/project/safe_cache_form_clear

https://www.drupal.org/project/optimizedb

//Reference
http://www.globalsoftlab.com/resource/blogs/cacheform-table-grows-huge-drupal

http://www.vmdoh.com/blog/drupal-cacheform-table-eating-disk-space-heres-fix

Drupal Service/REST Tutorial

https://www.drupal.org/project/services
https://www.drupal.org/node/113697

http://drupal.stackexchange.com/questions/6551/creating-a-node-using-services-6-3-rest

Drupal iOS SDK – CSRF token
http://security.stackexchange.com/questions/25900/how-does-a-csrf-token-prevent-an-attack-and-how-can-i-safely-use-avoid-it-for-m

Drupal iOS SDK

https://github.com/kylebrowning/drupal-ios-sdk/wiki/drupal-ios-sdk-2.0

Chinese Tutorial
http://avnpc.com/pages/import-export-drupal-data-by-restful-service

2-Legged OAuth
https://www.drupal.org/node/1871498

Using oAuth with the Drupal iOS SDK
http://www.workhabit.com/blog/using-oauth-drupal-ios-sdk

Service and Android
http://mobile-grid.com/workbench/drupal-servicesrest-and-mobile-devices-using-android-example