how to backup the home directory using ssh?

Status
Not open for further replies.

Divvy

Active Member
806
2009
18
0
I know i can back up the home directory + databases of one account in cPanel, but is there a command like pkgacct that will backup only the home directory? (without databases)

Basically, I want to transfer all file from one account to another, with same files/folders permissions.

If anyone have any suggestion for me, please post here :)

Thank you!
 
6 comments
no you can't with a command like pkgacct. but you can do that with tar

tar -cf homedir.tar /path/to/homedir

anyway still you will have to use chown command to change permissions :(

Highest Regards
Mohammed H
 
Code:
tar -zcf /destination_dir/filename /home/account/public_html
example:
tar -zcf /home/account.tar.gz /home/account/public_html/

extraction similar
tar -zxf
 
Thank you guys!
Hmmm but I need to preserve files and folders permissions.
How about a command to copy the files from one account to another?
 
Thank you guys!
Hmmm but I need to preserve files and folders permissions.
How about a command to copy the files from one account to another?
Just add p to the tar command.

using jase example:
tar -zcfp /destination_dir/filename /home/account/public_html
example:
tar -zcfp /home/account.tar.gz /home/account/public_html/

extraction similar
tar -zxfp
 
Status
Not open for further replies.
Back
Top