![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Registered User
Industry Role:
Join Date: Jan 2002
Posts: 1,151
|
![]() I got a question I have two HD's on my server I want to back my sites over to the other HD once a week. Is there away to tar zip the domains and all sub folders and files in the domain where it keeps its chmod and all permissions on all files and subfolders and it's files? If so can someone please show me the command. Say I want to backup my-domain-name.com with all it's permisiions. That way if I was to have a problem I could just untar the good copy and be back in biz.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Sep 2003
Location: Vancouver ICQ: 3588423
Posts: 808
|
Take a look at rsync.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Registered User
Industry Role:
Join Date: Jan 2002
Posts: 1,151
|
Yeah rsync works good. One of my issues is I got alot of data to move between servers, and wondered if there was a way to tar up the domains that where rsync on the old server. Once all the data is moved over to the new server rsync will be setup on the new server like it is on the old.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,062
|
This should do it:
Code:
tar zcfp domains.tgz <paths> Code:
-p --preserve-permissions Extract all protection information. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Registered User
Industry Role:
Join Date: Jan 2002
Posts: 1,151
|
Thanks I will give it a shot.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Jun 2004
Posts: 133
|
Quote:
__________________
Bright Porn | Webmasters | Free Galleries | Sponsors | Traffic Trades | Hardlinks ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Registered User
Industry Role:
Join Date: Jan 2002
Posts: 1,151
|
Ok so say this is my tar file after it's been tared up.
domains.tar What will be the command line to untar it with the -p option. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Jun 2004
Posts: 133
|
If you used the option "z" before (while packing), you have to use it again while unpacking because "z" means -- use gzip compression. In that case you should use extension .tgz resp. .tar.gz not .tar nex time.
Finally, you can use either Code:
tar xvf domains.tar Code:
tar xzvf domains.tgz
__________________
Bright Porn | Webmasters | Free Galleries | Sponsors | Traffic Trades | Hardlinks ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Feb 2001
Location: Ringgold, Georgia
Posts: 1,939
|
all this linux talk is going to excite us all.. ;)
__________________
*HUGS*! Marsha |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Jun 2004
Posts: 133
|
Yeah, but it is still far better to describe parameters represented by alphanumerical characters than places to click on.
![]()
__________________
Bright Porn | Webmasters | Free Galleries | Sponsors | Traffic Trades | Hardlinks ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
$ man tar
for huge amounts use bzip2, better compression, a bit slower. something like: tar cvyf archive.tar.bz2 domain_dir/ to untar it tar xvyf archive.tar.bz2 flag v is verbose, you don't need that in script. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Registered User
Industry Role:
Join Date: Jan 2002
Posts: 1,151
|
Quote:
So If I use this option when I untar the way you show it. Will it keep the same permissions and such when I untar it on the new server. I just hate having to re chmod all the files and such on my scripts ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
Registered User
Industry Role:
Join Date: Jan 2002
Posts: 1,151
|
Quote:
Yeah the -p was throwing me off thats why I did not know the command to untar and save all the permissions. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |