[opensuse] 11.2 Rsync command clarification
rsync [options] source dest I assume the 'source' mentioned is what I want to backup and the dest is
Hi, As a fairly long time subscriber to this list and running Os 11.2 and looking at making a backup of my home directory to a locally connected NAS device that is owned by the root user. That is part of what will enable me to update to 13.2 on release. My current user can use 'sudo' but it is the syntax of the rsync command that is stopping me from executing as rsync can apparently be a BEAST if used incorrectly. I have read and re-read the man pages as well as doing some Google searches and reading Suse Linux Toolbox by Chris Negus. Many of references show copying from a remote host or using a remote daemon. Since I am doing it all locally I hope the list can help i.e. I am at the terminal on the machine that holds the information to be backed up and also has the Drobo is connected. My reading has given me that the command reads: the location I want the backup? My command so far is: $> sudo rsync -avPh /home root@Umalusi:/drobo/backup-'date +%A'/ This would, I believe, recursively copy all items in the /home directory, archiving files and folders, being verbose, and provide a human readable progress indicator, and place them in a dated folder on the backup medium with path being /Drobo. Since it is copying onto a root file-system is sudo still required or would it not still request the root password? Can you answer any of the queries, correct my command syntax, or redirect my thinking? Help towards using the cli property is the main aim, besides doing the backup etc etc. Your thoughts? Regards Hylton -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 28/06/2014 21:48, Hylton Conacher (ZR1HPC) a écrit :
I assume the 'source' mentioned is what I want to backup and the dest is the location I want the backup?
yes. Mixing source and dest is the worst error :-(
My command so far is: $> sudo rsync -avPh /home root@Umalusi:/drobo/backup-'date +%A'/
This would, I believe, recursively copy all items in the /home directory, archiving files and folders, being verbose, and provide a human readable progress indicator, and place them in a dated folder on the backup medium with path being /Drobo.
Since it is copying onto a root file-system is sudo still required or would it not still request the root password?
sudo is only required if you are not root on the source my notes: http://dodin.info/wiki/index.php?n=Doc.CompleteBackup jdd -- http://www.dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Tnx jdd, On 28/06/14 22:47, jdd wrote:
Le 28/06/2014 21:48, Hylton Conacher (ZR1HPC) a écrit :
I assume the 'source' mentioned is what I want to backup and the dest is the location I want the backup?
yes. Mixing source and dest is the worst error :-(
My command so far is: $> sudo rsync -avPh /home root@Umalusi:/drobo/backup-'date +%A'/
This would, I believe, recursively copy all items in the /home directory, archiving files and folders, being verbose, and provide a human readable progress indicator, and place them in a dated folder on the backup medium with path being /Drobo.
Since it is copying onto a root file-system is sudo still required or would it not still request the root password?
sudo is only required if you are not root on the source
Running as root on a workstation can lead to all sorts of problems especially when the same desktop is the Mailserver :) I usually only run as normal user with sudo if I have to.
my notes:
I had a look Regards Hylton -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/28/2014 03:48 PM, Hylton Conacher (ZR1HPC) pecked at the keyboard and wrote:
Hi,
As a fairly long time subscriber to this list and running Os 11.2 and looking at making a backup of my home directory to a locally connected NAS device that is owned by the root user. That is part of what will enable me to update to 13.2 on release.
My current user can use 'sudo' but it is the syntax of the rsync command that is stopping me from executing as rsync can apparently be a BEAST if used incorrectly.
I have read and re-read the man pages as well as doing some Google searches and reading Suse Linux Toolbox by Chris Negus. Many of references show copying from a remote host or using a remote daemon. Since I am doing it all locally I hope the list can help i.e. I am at the terminal on the machine that holds the information to be backed up and also has the Drobo is connected.
rsync [options] source dest I assume the 'source' mentioned is what I want to backup and the dest is
My reading has given me that the command reads: the location I want the backup?
My command so far is: $> sudo rsync -avPh /home root@Umalusi:/drobo/backup-'date +%A'/
You will need a "/" at the end of the source and destination for a recursive copy to be made. I use the following to copy only certain directories from my home folder to the backup location: ********** echo "HomeVideos" sleep 1 rsync -varP --stats Videos/ /storage/home/ken/Videos/ --------- for you it would be: sudo rsync -varP --stats /home/ root@Umalusi:/drobo/backup-'date +%A'/ ********** I use the echo statement so my log has a record of which folder was being backed. The sleep statement is optional and use use --stats to show more info on the process. Also, /storage is a mounted second drive as I never keep backups on the same drive as the original because if the drive crashes there goes the original and backup all at the same time.
This would, I believe, recursively copy all items in the /home directory, archiving files and folders, being verbose, and provide a human readable progress indicator, and place them in a dated folder on the backup medium with path being /Drobo.
Since it is copying onto a root file-system is sudo still required or would it not still request the root password?
If you are copying all of /home it will need to be run by root. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi Ken, Thanks for the input. However, there is a comment about your command. On 29/06/14 16:56, Ken Schneider - openSUSE wrote:
On 06/28/2014 03:48 PM, Hylton Conacher (ZR1HPC) pecked at the keyboard and wrote:
Hi,
As a fairly long time subscriber to this list and running Os 11.2 and looking at making a backup of my home directory to a locally connected NAS device that is owned by the root user. That is part of what will enable me to update to 13.2 on release.
My current user can use 'sudo' but it is the syntax of the rsync command that is stopping me from executing as rsync can apparently be a BEAST if used incorrectly.
I have read and re-read the man pages as well as doing some Google searches and reading Suse Linux Toolbox by Chris Negus. Many of references show copying from a remote host or using a remote daemon. Since I am doing it all locally I hope the list can help i.e. I am at the terminal on the machine that holds the information to be backed up and also has the Drobo is connected.
rsync [options] source dest I assume the 'source' mentioned is what I want to backup and the dest is
My reading has given me that the command reads: the location I want the backup?
My command so far is: $> sudo rsync -avPh /home root@Umalusi:/drobo/backup-'date +%A'/
You will need a "/" at the end of the source and destination for a recursive copy to be made. I use the following to copy only certain directories from my home folder to the backup location:
********** echo "HomeVideos" sleep 1 rsync -varP --stats Videos/ /storage/home/ken/Videos/
I believe there is an error in your rsync command as if the archive or 'a' bit is set it automatically includes the 'r' i.e. archive mode; equals -rlptgoD (no -H,-A,-X) from <http://www.comentum.com/rsync.html>
--------- for you it would be: sudo rsync -varP --stats /home/ root@Umalusi:/drobo/backup-'date +%A'/ ********** snip If you are copying all of /home it will need to be run by root.
I need to copy the entire Home as that is where my mailserver stores its Maildir files. When I run the command as user hylton@Umalusi:~> rsync -vanP --stats /home root@Umalusi:/drobo/backup-'date +%A'/ I get the below error? ssh: connect to host Umalusi port 22: Connection refused rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32) rsync error: unexplained error (code 255) at io.c(1525) [sender=3.0.6]" I dunno what is refusing the connection because the Firewall is not installed if I go into the 'Configure a SSHD Daemon' it lists Port 22 under SSHD ports? Maybe its the fact I am doing a trial run i.e. -n? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Hylton Conacher (ZR1HPC)
-
jdd
-
Ken Schneider - openSUSE