backmeup / backmeup-prototype

BackMeUp v1 Standalone Backend
Other
3 stars 0 forks source link

ZIP Download #48

Closed WolfgangEibner closed 12 years ago

WolfgangEibner commented 12 years ago

Implement ZIP Download

Should be clarified:

ghost commented 12 years ago

Note: The zip plugin doesn't need any input parameters. The list of required inputs will therefore be empty. In general: The frontend should skip to the next web page, if a plugin doesn't need any inputs (a call to postAuth can be omitted in these cases)

ghost commented 12 years ago

ZIP-Plugin is now deployed on dev02, copying the zip files to /tmp/backups/{userId}/{backupfilename}-{timestamp}.zip

@WolfgangEibner / @fetzig: Please specify the destination folder for the frontend on dev01 - I'll use the same as on dev02 for now.

@keros: I would also like to test the sftp feature. Please provide a ssh certificate + correct paths to copy to. To do this, we have to configure the zip plugin's zip.properties file (src/main/resources/zip.properties) and rebuild it:

# {0} ... the user id
temporaryPath = /tmp/backups/{0}/
# note: If isRemote is true, the zip file will be copied to a sftp destination. 
isRemote = true
# {0} ... the user id, {1} ... the filename of the zip
remote.target = /tmp/backups/{0}/{1}
# {0} ... the user id
remote.directory = /tmp/backups/{0}/
remote.host = openrc2
remote.port = 22
remote.user = root
# maybe we want to use a different key here
ssh.key = /root/.ssh/id_rsa

These settings have been copied from the discmailing plugin.

ghost commented 12 years ago

Deployed and tested local zip file creation on dev01.

keros commented 12 years ago

You can use the "/root/.ssh/id_rsa" key file on the server. The server can now ssh to itself with this keyfile.

Place the files on "/data/backmeup-frontend-backupfiles" or something like this. Don't forget to change the "remote.host" to "localhost".

ghost commented 12 years ago

Ok, I just tested this on dev01. Files will be placed via sftp on localhost /data/backmeup-frontend-backupfiles/{userId} after a zip backup job finished.

ghost commented 12 years ago

ZIP-Plugin working as follows:

dev01 settings: ZIP-Backups will be copied to /data/backmeup-frontend-backupfiles/{userId} as proposed by keros.

Remaining steps:

keros commented 12 years ago

Added cronjob to "bmu-dev01"

00 05   * * *   root     find /data/backmeup-frontend-backupfiles -type f -mtime +1 -exec rm {} \;

Files older than one day get now deleted

WolfgangEibner commented 12 years ago

Closing because only thing left is listing available downloads in UI. Created an extra issue for this (see above).