- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- backup and restore linux using rsync
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2011 01:38 PM
07-24-2011 01:38 PM
backup and restore linux using rsync
hi
I'm looking for scripts to backup and restore the whole linux over network using rsync.
- Tags:
- rsync
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2011 07:37 AM
08-03-2011 07:37 AM
Re: backup and restore linux using rsync
Hi Chris,
Do you use ssh (with auto-login) to execute rsync backup? OR, do you use the rsyncd server with no password authentication?
I used to backup using the latter method, but I found this to be a security issue so I use the former (the ssh method). Anyways, here's an example simple rsync script:
#!/bin/bash
#Copies all of the following folders from remote computer (remote-pc) to local computer (local-pc)
now=`/bin/date`
export now
echo "=================================================" | tee -a /var/log/start-rsync-backup.log
echo "$now Begin rsync Backup" | tee -a /var/log/start-rsync-backup.log
echo "=================================================" | tee -a /var/log/start-rsync-backup.log
rsync -avzp -e "ssh -i /home/foobaruser/.ssh/foobaruser-key" remote-pc.remotelocation::/home/foobaruser/Documents /u/rsync-backups/local-pc/backupdir/ | tee -a /var/log/start-start-rsync-backup.log
The local user ("foobaruser" in this example) must exist on the remote pc as well. The ssh keys from the remote and local user must also exist in the remote and local $HOME/.ssh/authorized_keys file for password less ssh operation. Google "ssh password less" and see resources online on how to generate your ssh keys. Once the keys are installed correctly on both local and remote servers, you can put your rsync backup script into cron as an automatic job.
HTH