Is there a way to save simultaneously to two paths?

Asked by Robert Easter

Otherwise not listed: How can I set up to simultaneously save to both my harddrive location and a second, removeable, drive?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Wim (launchpad-xs4all) said :
#1

Robert,

I think you want to make a backup of all changed and created file during every time you work;
that is not directly possible working in a program and choose "Save to 2 locations"

There is a work-around:
you can make a script that runs everytime you log in, that copies all new-/changed-files to your removable disk.

The idea is (i assume you save everything under
/home/robert/. )
1. pack all changed file to a temporarily backup-file
2. extract all these files to yout removable disk
Run this script either commandline or everytime you log in (or out)

The homework for you is to look at the information of the commands:

   cd /home/robert

   find --help | more

(to locate changed files, you will start with something like
   find -options-change-time -type f .
if you use a . instead of a * not only files, but also your settings will be saved)

   tar --help | more

(you will use this command twice:
   tar -options-you-choose -cvf /path/BackUpFileName.tar ` the-find-command-here `
and something like
   cd /media/usb0 (or other location of your removable disk; followed by the command)
   tar -other-options -xvf /path/BackUpFileName.tar

I hope the help-function is giving sufficient information to complete the script; can you continue with these tips or do you need more information?

Revision history for this message
Robert Easter (easter-robert) said :
#2

Thanks, Menting,

I'll really have to sit down with this and see how much of it I'll be
able to parse out. Hoping I can get back with you when I've compiled my
list of lame questions? Basically, the gamut of Compleat Idiot stuff
like "what's that mean?" or "what if my machine doesn't know that command?"

thanks again.

Robert

Menting wrote:
> Your question #50924 on openoffice.org in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/openoffice.org/+question/50924
>
> Status: Open => Needs information
>
> Menting requested for more information:
> Robert,
>
> I think you want to make a backup of all changed and created file during every time you work;
> that is not directly possible working in a program and choose "Save to 2 locations"
>
> There is a work-around:
> you can make a script that runs everytime you log in, that copies all new-/changed-files to your removable disk.
>
> The idea is (i assume you save everything under
> /home/robert/. )
> 1. pack all changed file to a temporarily backup-file
> 2. extract all these files to yout removable disk
> Run this script either commandline or everytime you log in (or out)
>
> The homework for you is to look at the information of the commands:
>
> cd /home/robert
>
> find --help | more
>
> (to locate changed files, you will start with something like
> find -options-change-time -type f .
> if you use a . instead of a * not only files, but also your settings will be saved)
>
> tar --help | more
>
> (you will use this command twice:
> tar -options-you-choose -cvf /path/BackUpFileName.tar ` the-find-command-here `
> and something like
> cd /media/usb0 (or other location of your removable disk; followed by the command)
> tar -other-options -xvf /path/BackUpFileName.tar
>
> I hope the help-function is giving sufficient information to complete
> the script; can you continue with these tips or do you need more
> information?
>
>

--
Are you Sanctifused?
http://sanctifusion.blogspot.com

Revision history for this message
GercoKees (gercokees) said :
#3

or an other idea:
use rsync.
This syncs data between two disks over a network. (Your backup drive might be on the other side of the country, if you like)

The syntax is like this:
rsync -arvuz /home/robert/ robert@remotecomputer:/home/robert/

For more information:
http://en.wikipedia.org/wiki/Rsync

You can write a script and run the script every 10 minutes using cron
http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5

Remember, Google is your friend but do not hesitate to ask here....

Can you help with this problem?

Provide an answer of your own, or ask Robert Easter for more information if necessary.

To post a message you must log in.