View Full Version : SSH commands for copying folders?
bashy
10-17-2006, 09:37 AM
Hi peeps
What are the SSH Commands from copying a folder on the ftp to another folder on the FTP
Basically i want to backup my forum folder and keep the backup on the ftp for now,?
Ntfu2
10-18-2006, 02:43 AM
cp -R /path/to/folder/foldername /path/to/backup/backupname
If you are trying to backup, you may want to tar it up first
tar cvf tarname.tar /path/to/folder
then it'll be easier to move around and find later on.
bashy
10-18-2006, 05:10 AM
Nice one m8 thanks very much!!
Could i please ask, whats the command to un tar the file and put it back...
e.g. unzip backup of /forums to /forums please?
Must admit, i so wish i had thought about doing it this way before, this is so much easier
than ftping all the files down and backup up when moving and so on.
I always assumed SSH was too cmplicated, but once ya know the commands its easy ::)
Thanks again
Guest210212002
10-18-2006, 04:53 PM
tar -zxvf backup.tar /path/to/folder
bashy
10-18-2006, 05:27 PM
Thanks Chris , what does the zxvf stand for?
Ntfu2
10-18-2006, 05:36 PM
This list will help you bashy to learn some SSH commands and what they do
http://www.iteligent.com/kb/unix.txt
z - cant remember but its sorta like to make sure it will extract .tar and .tar.gz files i think.
x - extract/restore
v - verbose (puts out file names for each file in file)
f - file. Use the tarfile argument as the name of the tarfile.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.