Copying or backing up files to the remote machine is a good practice if hard disk space is not a concern.
Having a backup on the same machine is like the old saying "putting eggs in one basket".
Backing up data on another machine would simply eradicate the worries of losing data provided that the backup is really a backup.
Backup should be tested as often as possible.
Backup is for disaster recovery and it should be able to cover the disaster and not add a burden.
In Linux "tar" is a good old tool which does a pretty awesome job to backup or copy files.
TAR - tape archiver, as the name implies it is designed for tape backup.
To automate backup using “cron” scheduler, "tar" is a good choice since it will only require the 'user name', 'remote machine IP address or hostname' and the path on the remote machine where the file should be copied.
Once the above requirements are known, tar will be able to copy to the remote machine and will not ask for any password.
Using automated scheduler like "cron", “tar” is ideal for remote copying but of course, other commands or tool can be used but sometimes requires manually typing the password or configuring both machines to trust each other using some certificates.
Since tar, was designed for tapes once all the necessary options are provided on the command and no other issues, tar would backup or copy the files to the remote machine without any user intervention.
Here's the command:
tar cvzf - /path_to/local/folder | ssh [remote-user-name] @[remote-ip-address] "dd of=/path_on/remote/server/file_name_data.tar.gz"
cvzf - options for the tar command.
Consult "man tar" to know more about those options.
Cheers..hope it helps..
==================================
Linux Android App cheat sheet:
https://play.google.com/store/apps/details?id=com.LinuxMobileKit
Free Android Apps:
Click on links below to find out more:
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Catholic Rosary Guide for Android:
https://play.google.com/store/apps/details?id=com.myrosaryapp
http://quickbytesstuff.blogspot.sg/2014/09/how-to-recite-rosary.html
Divine Mercy Chaplet Guide (A Powerful prayer):
https://play.google.com/store/apps/details?id=com.dmercyapp
Educational Android App for Kids:
https://play.google.com/store/apps/details?id=com.xmultiplication
https://play.google.com/store/apps/details?id=com.letsmultiply
==================================
Linux Android App cheat sheet:
https://play.google.com/store/apps/details?id=com.LinuxMobileKit
Free Android Apps:
Click on links below to find out more:
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Catholic Rosary Guide for Android:
https://play.google.com/store/apps/details?id=com.myrosaryapp
http://quickbytesstuff.blogspot.sg/2014/09/how-to-recite-rosary.html
Divine Mercy Chaplet Guide (A Powerful prayer):
https://play.google.com/store/apps/details?id=com.dmercyapp
Educational Android App for Kids:
https://play.google.com/store/apps/details?id=com.xmultiplication
https://play.google.com/store/apps/details?id=com.letsmultiply
Comments
Post a Comment