backup

Events happening in the community are now at Drupal community events on www.drupal.org.
dadoonan's picture

I have a new client one of whose sites is Drupal (7.15) based.

Is there a module that will create a backup file of the db AND all the site files? I'm looking for the Drupal equivalent of Joomla's Akeeba.

thanks,
david doonan
greenwich, ny

Comments

This for the

druderman's picture

This for the database.
http://drupal.org/project/backup_migrate

This module appears to backup files, but I haven't tried it.
http://drupal.org/project/backup_migrate_files

Drush

limako's picture

Maybe you don't have command line access, but Drush can do this (drush ard).

Thanks ... next question

dadoonan's picture

Both modules worked fine. Looking the notes on the Restore page, I found this:


Restoring will delete some or all of your data and cannot be undone. Always test your backups on a non-production server!

As I stated in the first message, this is for a new client of mine. A year or so ago they hired a firm to design a new drupal based site. The agency used a sub-directory for development and testing. Once approved, they simply left the content in the sub-directory and added a refresh to the home page in the web root.

I've been tasked with moving the site from the sub-directory into the web root. My question is what does the warning message above refer to? Will the restore wipe out everything the web root or does it mean that existing files & folders in the web root with the name as those in the backup will be overwritten? Or does it mean something else?

One last question ... can I assume that since the restore is happening on the same server there is no need to restore the db?

thanks,
david

The obvious answer is that a

druderman's picture

The obvious answer is that a restore of a database will replace the database. Thus the warning. Probably the same with files.

You should try it out locally. Install a LAMP stack and see what you get when you restore your backup locally.

You are right about the database, usually you don't need to 'move' the database if you are simply moving the site files - as long as you use the same settings.php file.

Meanwhile, if your site is in a sub directory, it's ok to leave it there and reconfigure the webserver to serve from there instead of having a redirect in place. That becomes an apache configure problem and not a drupal problem. You may need to do tweaks later in case something is using absolute links.

-dave

Am restoring into a new test

dadoonan's picture

Am restoring into a new test folder to make sure that I have a viable backup file.

The backup file is 332.93 mb ... will this take a few hours to restore?

david

A good tip is to clear the

druderman's picture

A good tip is to clear the Drupal cache before doing backups. All sorts of cached data and session data are saved to the database. This is not stuff you need to be restoring.

Thanks for the help all.

dadoonan's picture

Thanks for the help all. After installing both modules I was able to backup then restore into a new test folder.

There remains one issue however. While the home page resides in the new test folder, all the links point to the existing folder.

Is there a global drupal function which will take care of this?

Configuration / Site Information shows the location as the existing folder, but does not include an input field for changing the location.

david

If you mean external links

druderman's picture

If you mean external links into your site, then you can either do Apache redirects with a .htacess file or turn on the Drupal Redirect module which is good for individual redirects.

If you mean only internal links, then it sounds like people have been entering absolute paths or URLs. You can clean up your site by editing content, updating the database directly and carefully, or, if you are daring, do a search/replace on your database dump and then restore it.

Anyone out there correct me if I left out something simpler.

-dave

Yes, I'm referring to

dadoonan's picture

Yes, I'm referring to internal links only.

It does not appear that absolute paths were used. For example, the path input to the About page is node/84.

To better explain what's going on ...

The index.html in the web root is a redirect to a folder called 'sites'. The previous agency used this folder while doing a major redevelopment. After approval, they were supposed to migrate the new site files into the web root but they never did.

When I view the site in the test directory (created using the backup and migrate modules) created a few days ago called '2013-test-location', when I hover the About Us link, instead of being directed to '2013-test-location/about', I'm directed to 'sites/about'.

When viewing '2013-test-location' and opening the admin side, I'm redirected to 'sites/admin/ rather than '2013-test-location/admin'. While I can manually change the path to '2013-test-location/admin', when viewing config/system/site information, the default home page & error pages are set to the 'sites' folder.

Somewhere there should be a way of changing the home directory from /sites/ to the web root.

Once the links remain within the 2013-test-location' I'll do another backup and migrate to move everything into the web root.

david
p.s. Can someone recommend a good book on drupal?

If you see the right link

druderman's picture

If you see the right link when you hover over it, but you get a redirect to another directory, then it's likely an Apache or .htaccess problem.

If you see the wrong link when you hover over it, then it's a drupal thing. Drupal usually uses relative paths, so no change needed.

But I didn't realize you could explicitly set the base url in the settings.php file. You might check if this is the case. If so, comment the line out. And of course, clear the cache.

http://stackoverflow.com/questions/5879190/how-to-set-the-base-url-in-dr...

-dave

Thanks all. Setting the base

dadoonan's picture

Thanks all. Setting the base url in the settings.php was just what I needed.

david

Western Massachusetts

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: