CakePHP ACL database creation without shell access - sql

This may be a really simple question, but I'm trying to create the database for ACL in CakePHP. I don't have shell access, so I want to simply upload the sql file through PHPmyAdmin.
The cakePHP instruction manual says to use app/config/sql/db_acl.sql, but the most recent download of cakePHP does not have that file. Instead it has app/config/schema/db_acl.php, which obviously can't be uploaded to create the tables.
Is the sql file still available? Is there another way to create those tables without hand typing it all?
Thanks!

The file should be available if you created the project folder using bake.
If it's not, it should be in /cake/console/templates/skel/config/schema/db_acl.sql.

Related

Dumping postgresql databases and accessing them via ftp

I'm developing an automated backup system for a server using PostgreSQL and Tomcat. The environment is CentOS minimal 7. Long story short, a VM will download the .sql dumps and a .tar.gz folder containing Tomcat via FTP.
No problems in setting up vsftpd, I can access the Server via FTP with a custom user (ftpuser) which currently can access a specific folder (/home/ftpuser/backups/). I can compress tomcat there so my script will fetch the backups/ folder and download it, but I cant figure out how to dump the postgresql db to the /home/ftpuser/backups/ folder without having to do some stupid things with sudo.
Postgres user haven't the permission to write there and i can't give them to him even with chown or chmod. I inserted postgres in sudoers and if I dump the db and then I "sudo cp" it to that folder is okay, but in this way I cant use a script to do that, due to "sudo" asking password.
The question is.. Is there a way to enable "pg_dump" to write .sql dump to /home/ftpuser/backups/ folder?
Thanks for the replies.
pg_dump does not need to be run from the postgres user.
Run it from a user that can write to the desired folder, and pass the --username=database_user parameter to specify the desired database user. You'll probably need a .pgpass file for the password used by this user (unless it has been defined to be trusted on pg_hba.conf).

Deploy a sql compact database with installshieldxc xz

I have a windows form application that requires users to log in to access the information. I have created a local compact database file for the credentials to be stored. I added the database file to my the folder but when I open my application and try to log in it tells me that it cannot find the database file.
Should the file be stored on a different folder, or should I need to install an instance of sql on the user computer.
This is my first deployment so I am not sure how to go about it. I have done some research on the subject, but it does not seem related to my issue. The help section of Intallshield was not clear either.
I am looking for some resources on how to accomplish this.
I figure out the issue, in order to work all files, including the database files need to be dumped under the userprofile folder.

Use SQL to delete old MediaWiki revisions without shell access?

Does anyone know a SQL query that will purge a MediaWiki database of old revisions? My database has grown out of control, and I need to prune it to make it possible to download and manage.
I don't have shell access so, I need to do this with a SQL query.
I have tried the solution suggested here, but it doesn't work http://www.mediawiki.org/wiki/Extension_talk:SpecialDeleteOldRevisions2#Deleting_only_archived_revisions
Thanks for reading :)
Nicholas
As you, I don't have shell access to my MediaWiki. So I can't do a lot of things like maintenance.
Here is my solution : host your MediaWiki web site on your computer just to do your maintenance tasks
Backup your database
Backup your MediaWiki folder
Setup Apache (the web server) on your computer
Setup MySQL on your computer
Restore your MediaWiki database on your computer
Put your MediWiki folder on the Apache root folder
Finally run the maintenance task you want using shell. I suggest you the deleteOldRevisions script
After that, rebackup the folder and the database and restore them on the remote host
Use the Maintenance extension and run the relevant maintenance scripts with it. Direct database manipulation is pure madness, and using a local LAMP install as suggested by the other answer quite cumbersome.
Shell access is really required to properly run a MediaWiki but this is a common problem, please report your experience with the extension on the talk page or file a bug if you find any.

moving file from desktop to Oracle directory

I have created a directory in Oracle via the command create directory. The directory is called temp. I have a file located on:
G:\Documents\SO\Content\102010 Stack Overflow\test.xml
that I want to put in this directory. How can I do this via a SQL statement?
Oracle's directory feature is not meant to enable file transfer from a client to the server. If you want to put a file there for Oracle's use (e.g. as an external table), then the standard way that is done is for the dba or system administrator to move the file into the appropriate directory on the server; or for them to grant you access via standard file-sharing means.

Joomla 1.5 Site Backup Strategy

I would like to make a complete backup of my whole joomla 1.5 based site from time to time. How would this ideally be done? Are there any common pitfalls? Not that I only have ftp access to the hosting server. Is there a step by step tutorial somewhere? I am using latest Joomgallery and Kunena 1.0.9 (Legacy mode).
Maybe there is a good way to automate this?
There's two parts of the backup you have to worry about, the database and the files.
The first part is the database. It can be backed up using something like phpMyAdmin. If you don't have this available on your server already, it's not too hard to upload and get it going yourself. From there, you can just Export the entire database to a gzip file.
The second part is the code and uploaded files. The code base shouldn't change too often, so you could probably just make one backup of this. There's a number of ways. The simplest is to just download the entire folder via FTP, though if you're Linux, I'm sure someone will know a single command line to get all the changed files (rsync?).
The database is the main thing you have to worry about though: everything else should be able to be rebuilt just by reinstalling.
I think this: http://www.joomlapack.net/ is what you need. I use it myself and it works like a charm. Both for backups and for moving my Joomla installations from developer sites and to the real site.
get an FTP synchronisation tool and keep an up-to-date copy of your site locally. Then you could run the batch script
mysqldump -hhost -uuser -p%1 schema > C:\backup.sql
to create a backup of your mysql tables at various points in time.
edit
you would have to have MySQL Server installed on your local machine and path to its bin directory in you PATH, in order to run the mysqldump command without much hassle. -p%1 would take the command-line provided password, as you wouldn't want to store passwords in your batch script.
If you only have FTP access you are in a bit of a problem, as beside all files you'll also have to backup the database. Without accessing the database, a full-backup won't do you any good.
Whatever backup strategy you choose - be sure it can handle UTF-8 correctly. Joomla 1.5 stores all content with UTF-8, even when the database charset is set on 'iso-5589-1' - so when the backup solution is detecting the database charset, some characters like € or é will result in "strange" ¬ / é - not really what you'll want.
I absolutely endorse using Joomlapack - it works great. The optional remote tools allow you to initiate the backup from a Windows desktop machine - it performs the backup and downloads it. The remote has a scheduler, and you can also set it off to backup and download a list of sites.
Joomlapack also provides a file "kickstart.php" which you copy to your empty server account along with the backup, which automates the restore procedure. You do have to create an empty database with PHPMyAdmin or similar, and you are given the opportunity to supply the database parameters (host, database, username, password) during the process.
One pitfall I did run into with this though is that some common components can have absolute URLs in their configuration - e.g. SOBI2, Virtuemart. It's then just a matter of finding the appropriate configuration file, editing it and re-uploading it.
Another problem was one archive file (either ZIP or their JPA format) got a filename with a "?" character in it (from a Linux server) and this caused a bit of a problem trying to install it locally on a Windows WAMP stack - the extract process on the ZIP file failed, and it stopped the process completing cleanly.
I suggest using automatic backup service by http://www.everlive.net
Update:
Ok, here is some more information. EverLive.net is a website where you can create a free account. Enter your website details and you are ready to take your backups withe just one click. Restore is also possible in the same way.
Further you can use automatic backup option to take automatic backups at defined intervals. Other than that, you can use the website health check service to inform you if your website is not available.