
![]() |
|
|
|||||||
| General Linux Are you a Linux fan or just a guru. Talk about Linux and all of the ideas you may have about it here. We’re all looking for more knowledge about the world's best open source operating system, so let's share your happy times and bad times here. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
I have a cron job that I use to backup the folder of a domain . . . it goes something like this
cd /home; tar -czvf ../_BACKUP/bu_RDIV.tar.gz rdiv this would create a file called bu_RDIV.tar.gz in the home/_BACKUP folder of the contents of the folder rdiv. Now I have another domain/folder called jim that I want to backup - this folder contains a folder called media that is much too large for me to want to backup with a cron job. It never changes and I already have a backup locally. Is there a way to modify this scrip so that i backup the contents of the folder jim except for the folder media ? THanks, jim |
|
#2
|
|||
|
|||
|
In case it helps someone else, I found a solution in the man pages for tar
Quote:
so something like this will copy the entire contents of the public_html folder except for the media folder to a file called backupFile.tar.gz cd /home/accountname; tar -czvf backupFile.tar.gz --exclude media public_html |
![]() |
| Tags |
| cron |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|