You are here

Command-line switches for backup?

13 posts / 0 new
Last post
PedleZelnip
Offline
Last seen: 17 years 6 months ago
Joined: 2007-04-26 13:20
Command-line switches for backup?

Is there a way to execute the PortableApps backup facility from the command line rather than by clicking "backup" in the menu?

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 50 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not right now

Any particular thing you're trying to accomplish with it? Lemme know and I'll see if it makes sense to add it in to a later release.

Sometimes, the impossible can become possible, if you're awesome!

dutch109
Offline
Last seen: 16 years 11 months ago
Joined: 2006-08-23 15:34
I'm interested in that

I'm interested in that feature too. I always backup my USB drive with 7-zip using a password and SFX executable archive. Why SFX ? Because I can restore my drive without any software.

LaRoza
Offline
Last seen: 17 years 2 months ago
Joined: 2007-03-30 11:37
Alternate Backup

You could write a batch file to backup.

PedleZelnip
Offline
Last seen: 17 years 6 months ago
Joined: 2007-04-26 13:20
Exactly, but that would

Exactly, but that would require me to know the command line switches, hence my original question. =8-p

As for what I want it for, what I'd like is that when I stick my USB stick into my computer I get a prompt on the screen asking "Would you like to backup the stick now?", and if I click yes, it does the backup. I might even expand this a bit so that it's more automatic, where if I plug the USB stick into a "trusted" computer (like my home desktop) it does a backup automatically, but on any other machine it doesn't (so that when I plug my stick in at school I don't get extra prompts I do not need).

Either way though I need to know how to trigger the backup procedure by command-line.

Wences
Offline
Last seen: 5 years 1 month ago
Joined: 2007-04-17 22:05
Interesting concept!

I believe PedleZelnip has just introduced a concept that has been sort of missing in all this Portable Apps "movement" (is calling it a movement too much?): a "home" computer.
Theoretically, it would be possible to own only a USB drive and nothing else, and use it in Cyber cafés, school computers, and all other kinds of borrowed or rented computers. But most of us have a computer back home, and (I guess) most of us backup our files exclusively on that computer. Perhaps there are more functions that are only performed with/when on/against the "home" computer. Any one?

For this kind of thing, having a way to identify the home computer could be handy. Perhaps a private/public key pair, public on the USB drive, private at home. If the current computer doesn't have the matching private key in the expected dir, it isn't the home computer, and so, no back-ups, and a bit of extra paranoia...

Sounds interesting...

PedleZelnip
Offline
Last seen: 17 years 6 months ago
Joined: 2007-04-26 13:20
Crypto seems a bit like

Crypto seems a bit like overkill, I was just going to either check for the existance of a registry key (if it exists, then this is the home computer, if not it isn't), or just go by the computer's hostname.

Wences
Offline
Last seen: 5 years 1 month ago
Joined: 2007-04-17 22:05
Yes and no

It is a bit of overkill from the point of view of how much arithmetic the CPU will have to do, but it would be once in a session, and it's quick to program because you just look for a library that already does it, (you weren't thinking of writing that code yourself, right?) and like that there can be no mistakes

Also you can easily set two different computers as "home" computers, by just copying the key to them, whereas with the host name, you would need to write code specifically to let the user set two or more host names as "home" computers. (Practical example of this: I have one computer at the office and one at home. I could leave a backup of my files in the office computer... I could backup every night at home before I go to the office, and every evening at the office before I go home, so if I should loose my USB en route, I would loose no data).

Of course, you don't really need to go into private/public keys. Perhaps picking just about any string (ask the user for his name) and storing and MD5 of it in the home computer might do... but what happens if the user is called John Smith, or something like that... Many home computers from many different guys, all called John Smith will have identical MD5's... Yes, I know chances are slim, but well...

PedleZelnip
Offline
Last seen: 17 years 6 months ago
Joined: 2007-04-26 13:20
More Devils Advocate ;)

You wouldn't necessarily have to write code specifically to let the user set multiple "home" computers. You could just have a text file with a list of hostnames, and have your "HomeChecker" program check to see if the current machine's hostname is in that textfile (the benefit to this is that the "home" machine does not have to be modified in any way -- all needed data is on the USB drive). Or in the case of registry keys, you simply need only add the registry key to each of the machines you wish to use as "home" machines. I fully had in mind from the beginning the desire to use multiple "home" machines, as I would like to be able to backup on either of my two desktop machines at home, or my (well technically my wife's) laptop.

The downside to my techniques are that hostnames aren't necessary unique to a machine (for example, you might have a machine at work called "MyBox", and also have a machine at home with the same hostname). As well the registry keys approach could be "spoofed" if someone knew which registry key your program checks for.

The goal I had in mind wasn't so much security, but convenience. Smile

Wences
Offline
Last seen: 5 years 1 month ago
Joined: 2007-04-17 22:05
Totally agree!

I had all the same things in mind. Just that when I got to the part of "host name might not be unique" I rapidly patched my idea with a bit of crypto to make it unique. And I realized that this would mean leaving something in the host, but then again, that's the whole point of the "home computer": the one computer where you do leave stuff (like complete backups).
But yes, from some point of view, it might be overkill to use crytographic techniques just in case two guys named their computer "MyBox".

Oh! And that thing about the text file with the list of hostnames: that's exactly what I meant: it's specific to having many boxes. If you restrict it to just one computer, it's just one setting, stored with all the rest, and you don't need a loop to compare against each... let me see... no "while (condition) do" line... no "here ends the while" line... Wow! that's like 30 seconds less programming time! Smile

As you see, we're just giving different importance to a couple of little details, but actually, I think we agree.

PedleZelnip
Offline
Last seen: 17 years 6 months ago
Joined: 2007-04-26 13:20
Absolutely (we agree).

Absolutely (we agree). Smile

LaRoza
Offline
Last seen: 17 years 2 months ago
Joined: 2007-03-30 11:37
Batch

I meant writing one or more batch programs which copy a directory, or directories to a preset location.

You wouldn't be using the backup utility, but it would copy and save your apps, documents, or entire directory.

PedleZelnip
Offline
Last seen: 17 years 6 months ago
Joined: 2007-04-26 13:20
Sure yeah I could do that

Sure yeah I could do that (ie using some command-line based compression tool), but it just seemed that since PA has a backup option, why not use it? (wasn't sure if it does anything special or just zips the USB drive)

Log in or register to post comments