Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1489  / 3 Years ago, fri, october 8, 2021, 9:14:45

I have Ubuntu 12.10 installed running a LAMP stack for a small site I host. I need to set up a system for weekly backups of the /var/www directory where all of my sites are. What is the best possible way of doing this?


More From » 12.10

 Answers
6

rsync can do this and can also automatically append a timestamp to your backup files.
You can also put a rsync command straight into cron. As an example for a daily backup:



@daily rsync -ab --suffix=_`date +%F` -R {server}:/var/wwww /home/backups/


(this assumes you can already access this machine and that /home/backups/ exists and you also need to change {server} to the system where the files are)



The links posted in comments uses this as an example but has a better method end result: a backup script that you use from cron.


[#32715] Sunday, October 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
asketbridiculou

Total Points: 168
Total Questions: 116
Total Answers: 115

Location: Antigua and Barbuda
Member since Sat, Jan 28, 2023
1 Year ago
;