The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
![]()
tar -cjfp sitebackup.bz2 /full/path/to/folder/htdocs
that this line does not work makes sense. f = filename p = Preserve (only usefull on a restore!) by using "-cjfp " you are telling the tar command that it should out put a file (because of the f-flag) and that the name of that file is 'p' (the string immediately following the f-flag). PS I suggest you do not tar a fullpath, but rather a relative path, as this will make restoring to a different location much easier. Use: cd /full/path/to/folder/htdocs tar -cvzf sitebackup.tar.gz . <-- Use this if your forum is in the root of htdocs or: tar -cvzf sitebackup.tar.gz ./forum <-- Use this if your forum is in the 'forum' subdirectory of htdocs |
#12
|
||||
|
||||
![]()
I use this command as part of my backup cronjobs:
Code:
tar -czf /home/user/backups/data-`date --iso-8601`.tar.gz -C /home/user htdocs vbalbumpic vbattach |
#13
|
|||
|
|||
![]()
-f, --file=ARCHIVE - this is telling it to use the file/archive name you are giving in the command, so how does that not make sense to you marco?
-p - it doesnt matter if you use it while compressing or uncompressing, it just preserves the ownership/permissions and will do no harm if its there while compressing if you want to delete backups older than 5/10/15/20/25/30 days, you can simply use this in your cron job, simply change the number after the + in the command below. cd /$backupdir find /$backupdir -atime +30 -exec rm -rf {} \; You can place that that the end of your cron file for backups |
#14
|
|||
|
|||
![]() Quote:
The p-flag does not do anything when creating the archive. In the best situation it is ingnored, worse case the command will return an error (depending on the distribution/implementation) |
#15
|
|||
|
|||
![]()
I never said it did anything while creating a archive, as long as it isnt at the end as he did it, its fine, just like the v switch isnt needed in the command.
|
#16
|
|||
|
|||
![]()
When I try tar -cvzf sitebackup.tar.gz .
it tars all file/folders into a folder called ./htdocs/contents I need to just extract to /contents *** (as the new host has a public_html not htdocs) So if i opened the new tar'd file I would just see the contents. When im in htdocs and i try tar -cvzf sitebackuphtdocs.tar.gz i get tar: Cowardly refusing to create an empty archive What is the command for this because when I try tar -cvzf sitebackup.tar.gz full/path/to/folder/htdocs when i open the archive i get full/path/to/folder/htdocs/contents** and when im in the htdocs and do tar -cvzf sitebackup.tar.gz |
#17
|
|||
|
|||
![]() Quote:
|
#18
|
|||
|
|||
![]()
I tried again (with period)
tar -cvzf sitesfiles.tar.gz . and it went through the list of files/folders that it was tar'ing but the last lines were: ./sitesfiles.tar.gz tar: ./sitesfiles.tar.gz: file changed as we read it That appears to of TAR'd/zipped it still but when i open the TAR'd file (when downloaded) I have to click the directory ' . '(period) before seeing the contents I wants the contents to be listed as soon as the TAR folder is opened Any idea's? and do the few lines mentioned above after matter? f(ile changed as we read it) thanks, |
#19
|
|||
|
|||
![]()
As i posted before, you have a file thats being wrote to while your tar'ing the htdocs folder, do you have logs files or stats files in there?
If so you need to stop the program that is writing to the file or use the --exclude switch in the tar command. |
#20
|
|||
|
|||
![]()
Thanks for your help.
Could you please provide me with a full command and tell me where to try it from maybe the directory before htdocs? could you give me full command? Also I wants the TAR'd file to display the contents of htdocs not a folder then contents. thanks in advance PS is there also a way to retain permissions - the previous command you gave me didnt work. |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|