tar -cvfz mytarfilename.tgz /path/to/directory/to/tarball/
Creating a tar of a directory
- By Heather Mello
- Apr 5, 2016
tar -cvfz mytarfilename.tgz /path/to/directory/to/tarball/
Magento Settings: System >> Configuration >> System > ‘Cron (Scheduled Tasks)’ tab.
$ crontab -e
# Execute the Magneto cron every 15 minutes */15 * * * * /bin/sh /path/to/magento/cron.shThese settings allow Magento to generate and clean schedules within a 2-hour time frame.
$ yum update;
Get the NFS parts needed
$ yum install nfs-utils and yum install nfs-utils-lib;
$ yum install subversion
$ mkdir /var/nfs/
$ chmod -R 777 /var/nfs/
$ cd /var/nfs/
$ svn checkout http://wherever.yourcode.com/ /var/nfs/
$ showmount -e 192.168.1.1
This will show the available mounts from the /etc/exports
Here is the example output
Export list for 192.168.1.1:
/var/nfs 192.168.1.100,192.168.1.101
So you want to get the table name that is declared in the xml and you are not in an upgrade/install script.
If you were in an upgrade/install script you could just use:
$tbl = $this->getTable('catalog/product');
In any other page you can use:
$tbl = Mage::getSingleton('core/resource')->getTableName('catalog/product');
If this will return: catalog_product_entity
This works with any declaration that is set in the xml!
This is all the steps and details i used to create an instance of a web server to be used for a Magento Website.
1 - Start a m3.xlarge instance
2 - Make sure its part of a security group that has Ports 80, 443 open to all 0.0.0.0/0
3 - Add a SSH port execption for your IP
4 - Assign an Elastic IP to each new instance
5 - Get the ssh details from Connect Instance in the Amazon control panel and ssh into the device(s)
6- Change the date/time of the server
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
Real World example:
update catalog_product_entity_text set value = replace(value,'®','®');
If you have a new magento installation, and you notice that the join process takes a very long time to complete, your sendmail is probably the source.
Some new servers dont have sendmail setup properly and you need to adjust a few things.
For slow email from the app, edit 3 files.
1) /etc/resolv.conf, add search whateveryourdomainnameis.com in before the nameservers.
[root@Web1 etc]# cat /etc/resolv.conf
search winetapsocial.com
nameserver 114.243.44.83
nameserver 114.243.44.84
Lets say you wanted sql that looked something like:
SELECT `main_table`.*,`main_table`.`email` AS `invitation_email`,`main_table`.`group_id` AS `invitee_group_id` FROM `enterprise_invitation` AS `main_table` WHERE ((status ='new') OR (customer_id ='1234'))
In order to achieve this, your collection needs to be formatted like this:
$collection =Mage::getModel('enterprise_invitation/invitation')->getCollection(); $collection->addFieldToFilter(array('status','customer_id'), array( array('status','eq'=>'new'), array('customer_id','eq'=>'1234')));
Now to see what this looks like you can always echo the query that this creates by using
echo $collection->getSelect()->__toString();