Valhalla Legends Archive

General => General Discussion => Topic started by: Joe[x86] on October 04, 2005, 04:57 PM

Title: Software Request: Backup
Post by: Joe[x86] on October 04, 2005, 04:57 PM
Uh, yeah. A friend of mine is looking for a program that can automatically take files from a list, and put them in an alternate location, from another list. Anyone know a program that can do this, or is willing to write one?
Title: Re: Software Request: Backup
Post by: K on October 04, 2005, 05:04 PM
Why do you need a list for the destination? Or do you want to rename the files as well as move them?
Title: Re: Software Request: Backup
Post by: Charles on October 04, 2005, 05:13 PM
Basically what the program is supposed to do is copy a file from a destination like C:\My Documents\Pics\Pic.bmp to another folder on a different computer that is networked with the source destination.   Kind of need the ability to make a list of source locations and destination locations and a way to tell it what time to start this activity too please.  Think it's possible?

Title: Re: Software Request: Backup
Post by: Joe[x86] on October 04, 2005, 06:26 PM
(Its for him =p)
Title: Re: Software Request: Backup
Post by: nslay on October 04, 2005, 07:30 PM
Write a script
Title: Script for moving the files
Post by: Kp on October 04, 2005, 09:31 PM
#!/usr/bin/perl

# This is off-the-cuff, but it should do what you want.  No warranties, of course.
# This program is not suitable for any purpose at all.  Back up your entire house before using.
# User assumes all responsibility for installing perl and for any damage caused by the use, misuse, or incompetent use, of this program.

while (<>) {
  chomp;
  ($l, $r) = split;
  rename $l, $r;
}
Title: Re: Software Request: Backup
Post by: iago on October 04, 2005, 11:11 PM
I dunno, the easier way might be:

scp `cat sourcefiles` destip:destdirectory

Example:
Quoteiago@Slayer:~/tmp$ touch test1 test2 testc
iago@Slayer:~$ cat > files
test1
test2
testc

iago@Slayer:~/tmp$ scp `cat files` 24.76.173.61:/tmp
[email protected]'s password:
test1                                         100%    0     0.0KB/s   00:00   
test2                                         100%    0     0.0KB/s   00:00   
testc                                         100%    0     0.0KB/s   00:00   
iago@Slayer:~/tmp$
Title: Re: Software Request: Backup
Post by: Kp on October 04, 2005, 11:39 PM
Quote from: iago on October 04, 2005, 11:11 PMI dunno, the easier way might be:

scp `cat sourcefiles` destip:destdirectory

True, but that doesn't permit per-file renames, and it'll require several extra utilities to work on an MS-Windows system.  My method only requires perl.  Yours requires scp, cat, and a shell smart enough to process backticks. :)
Title: Re: Software Request: Backup
Post by: iago on October 05, 2005, 03:34 AM
Quote from: Kp on October 04, 2005, 11:39 PM
Quote from: iago on October 04, 2005, 11:11 PMI dunno, the easier way might be:

scp `cat sourcefiles` destip:destdirectory

True, but that doesn't permit per-file renames, and it'll require several extra utilities to work on an MS-Windows system.  My method only requires perl.  Yours requires scp, cat, and a shell smart enough to process backticks. :)

Well, I was going to use a "for i in..." which would support renaming with a simple "cut" or something, but that would require you to input your password for every file :)
Title: Re: Software Request: Backup
Post by: Joe[x86] on October 05, 2005, 03:18 PM
Hes in Windows =p
Title: Re: Software Request: Backup
Post by: rabbit on October 05, 2005, 04:37 PM
omg.....batch
copy %%a, %%b
Done.
Title: Re: Software Request: Backup
Post by: Joe[x86] on October 05, 2005, 05:21 PM
Hm, come to think about it, he could just map the drive hes backing up to as Z:.
Title: Re: Software Request: Backup
Post by: Explicit on October 05, 2005, 05:24 PM
I'm still lost as to what you guys are trying to do; all I'm getting out of this is the synchronization aspect, but I'm not exactly sure.
Title: Re: Software Request: Backup
Post by: Joe[x86] on October 05, 2005, 05:36 PM
Charlie doesn't exactly have a stable system, yet he wants his files to stay safe.
Title: Re: Software Request: Backup
Post by: Yoni on October 05, 2005, 06:53 PM
Quote from: Kp on October 04, 2005, 11:39 PM
My method only requires perl. Yours requires scp, cat, and a shell smart enough to process backticks. :)
Kp's method, then, is the one with heavier requirements, isn't it?
Title: Re: Software Request: Backup
Post by: Joe[x86] on October 05, 2005, 09:32 PM
1) Map your backup drive to Z:, or if that drive is taken, substitute another letter.
2) Create a new file with Notepad.exe called backup.bat and save it on your desktop (or anywhere else)
3) In this file, put the following batch code:

copy file newfile

for each file. Example:

copy C:\Windows\kernel32.exe Z:\Backup\Windows\Kernel32.exe
copy C:\Documents and Settings\Joe\Pornography\* Z:\Backup\Documents and Settings\Joe\Pornography

4) To back up your files, just double click the script.
Title: Re: Software Request: Backup
Post by: iago on October 05, 2005, 09:35 PM
Ok, how about the easy way: Why doesn't he set up an FTP server?  FileZilla seems like a good one.