GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Backing up website serverside, how-to? (https://gfy.com/showthread.php?t=906205)

Naughty 05-20-2009 01:24 AM

Backing up website serverside, how-to?
 
Could anybody please give me the command line to use if we want to make a backup copy of our entire installation on the server (because we're upgrading software, we need to be able to roll-back).

Cheers, downloading through FTP is taking days;)

Naughty 05-20-2009 01:26 AM

cp -rp /path/to/site /path/to/backup_dir

Is this correct?

zagi 05-20-2009 04:55 AM

Yes, cp -rp /path/to/site /path/to/backup_dir will work, but its better to use:


cp -Rp, it is a safer version of the command.

Also, VERY IMPORTANT, this will only backup your files -- most likely you have a database associated with the site which will need to be backed up as well:

mysqldump -Q -q -e --add-drop-table --database DATABASE_NAME > DATABASE_NAME.sql

Replace DATABASE_NAME with your db and this will make a file with all of your SQL data, best thing would be to run this command in /path/to/backup_dir so you have all of your restore files in 1 place.


All times are GMT -7. The time now is 05:45 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123