I created a Django website and filled the database with some entries. I then uploaded the site to Heroku. Later, I added more entries, but I mistakenly added them to the remote database.
I would like to (1) sync the local and remote databases (so that all the new material I added to the remote database gets copied to the local database) and (2) from now on work in such a way that I add entries to the local database first and then those entries get added to the remote database when I git push.
Any idea how to do this? Thank you.
Related
If I was to accidentally run a UserModel.remove({}, cb) and delete all of my user documents, how would I retrieve those documents? Would the process be same on a local DB on my computer VS a DB hosted on a remote server such as mLab?
No they can not be retrieved back once deleted. The only way to recover the data is to create a dump of that collections before deleting it or if you have a replica of that server. You can restore it from that.
So I'm trying to manually move Magento to new server with old school ftp/phpmyadmin method. I only have the sql dump and folders from the root of old server, not access to it anymore and I don't know the earlier magento version number.
Should I
do fresh install of Magento to new server and then substitute folders and somehow import sql?
or
dump the files and sql to the new server first and then run the installer (something else?)
Many thanks
Usually below methods are followed,
Empty your cache admin sessions
Empty your logs (mysql)
create backup your database and your files
check your new server that supports magento using this
upload your files and import your db. If your database size is very large then directly import your database to your mysql server using sql command. Command would be like this,
mysql -u username -p database_name < file.sql
for this you need to logged in your server(mysql)
Update your mysql credentials to your etc file and update path in core_config_data table .
Place some dummy orders to check emails are correctly delivered and payment, shipping etc.
Buy SSL Certificates and avoid shared hosting.
I am very new to cms and I am wondering if you fine gentleman can help me get started properly. Just a note, I have spent hours researching my questions and I could not find the answer I was looking for.
I have installed silverstripe locally and i started creating my own site with it. Created a new theme, deleted the old 2. It created some random database for me, it was mostly automated. Now I have a server, and I want to put it on my server, but I can't figure out for the life of me how to import it. I was able to install silverstripe and have a default theme (simple) running, but no matter what file I copy or change, it never loads my site. Does anyone has a tutorial on how this is achieved? server is with godaddy.
When I started creating this site, it created a database with a random name, how can I rename that database? What are the files I need to update?
How do I access phpmyadmin locally? localhost:port/phpmyadmin does not works.
1. Site deployment
Here is how I deploy a Silverstripe website to a live server.
ftp into the server
Upload all the files from the development folder to the server
Create a database on the server
Create a database user for the database and add all database privileges
Update the live mysite/_config.php file with your live database username, password and database name
Dump your local database
Import your database dump into your live server database
Call dev/build/?flush=all on your live server
Check the website works
Have a beer
2. Database renaming
The database settings are stored in mysite/_config.php. They should look something like this:
$databaseConfig = array(
'type' => 'MySQLDatabase',
'server' => 'localhost',
'username' => 'database_username',
'password' => 'database_password',
'database' => 'database_name'
);
To rename the database, rename your database in phpmyadmin. Then update your $databaseConfig database name in your mysite/_config.php file.
3. localhost phpmyadmin
Webmatrix does not come with phpmyadmin. You can download it, extract it to your webmatrix html root directory and use it. Or you can download an alternative like adminer, which is a one file database manager.
With regards to renaming your database, see the comments above as they are accurate.
However you still seem to be having problems getting your database out of your local environment, so let's concentrate on that first and see how you go with it.
Note that there are at least two ways you can back up/export your local database:
1). Using phpMyAdmin (Or other web-based DB utility)
2). Using the command line (see the 'mysqldump' command)
You asked about using phpMyAdmin to backup your SilverStripe database so I'll address only 1). above:
As this is specfic to your own development environment and you've not mentioned how far you've got in setting this up locally, nor any error messages you may have received, myself and others can only go so far in helping you out with this.
If you've setup phpMyAdmin as per the installation requirements, it should be installed by default and accessible at this address on your computer:
http://localhost:80/phpmyadmin
The following will also work, as port 80 is the default for most webservers:
http://localhost/phpmyadmin
If neither of these work and you receive a 404, 403 or 500 error (The screen in the browser should tell you which of these has occurred) I'm pretty confident you've not set it up correctly on your system. My suggestion is therefore to go back to the phpMyAdmin docs and re-check you've performed everything correctly as per your own environment setup (e.g. for Linux, OS X, Windows etc).
Once you're setup correctly, have a crack at the DB renaming suggestions above and coe back for more help if you need it.
I have two domains:
1.main domain : which have magento 1.4.1.1 site
2.sub domain : which have magento 1.7.0.2 site(this site is upgraded from magento 1.4.1.1)
That means in my sub domain it had magento1.4.1.1 magento as in the main domain in past.
Then i uprgaded the magento site to 1.7.0.2 in sub domain.
The client now using the main domain and they use the old databse.
In my sub domain i have new database and i imported the db backup .
But this backup was taken from before two months.
That means the db backup is two months old.
So in main domain ,the client enter new datas into the old database.
After importing databse in subdomain i upgraded the site to 1.7.0.2
So i want to put all changes in the old database to new databse.
The old database have 329 tables and new database have 367 tables
How can i do this?
The best option in your case:
Get dump of old database.
Setup the copy of the new codebase on another subdomain.
Load dump into new database and point newly created subdomain codebase to it.
Magento will automatically update the structure of the database.
If any error appear during upgrading of old database to new one, you can fix it without letting old website down (separate db, separate instance). If no errors were found, you can turn off old website, upgrade db, and upload new code base.
I creaed one dnn applicaiton, and the source is moved to production and also same as the database is also moved to production server, but i am getting the dotnetnuke error. I think there is a database not inserted correctly.
Can you help me how to transfer the database from local to production..
I would double check that your local and production site web.config have the same machine key and decription key all match
Other thing to check would be that the connection string is correct
One more thing would be to check permissions on the database
Use SQL Delta