Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Good time of a day!
My team develop the soft to backup files to web storage. Now it has simle functionality - just take files from hdd, check date in local and remote file and update remote to new local.
The product owner want to to make backup in another way: on remote server replace only chenge peace of file. They want to make less traffic to storage (it's Amazon S3)
Now we have a next solution: brake file into peaces (4 kb each), count checksum of each peace, store this data in local db and at next backup verify checksums and transfer only changed peace.
But the metadata take much place on db if we backup a big amount of files
Can anybody have another solution? Thanks for help!
Rsync uses rolling hash algorithm, so you might research that.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need to backup a file located on a remote machine using C#.
For example: "\server1\docs\test.txt" needs to be copied or moved to "\server1\docs\backup\test.txt."
Question: When I use File.Copy, does that move the file from the server, to my machine, back to the server -- essentially round-tripping the file across the network?
I'd like to avoid round-tripping.
Details: Both machines are Windows OS's on the same Domain.
Note: I want you guys to know that I have searched all over for the answer to this question, however, I have found contradicting answers. I'd like to know definitively. Thank you for your time.
You should run this from the server in order to avoid round-tripping the data. Keep in mind that if the files you're trying to work on are located on the same hard drive, moving them will be faster than copying them.
Just looking at the source code of C# (http://referencesource.microsoft.com/#mscorlib/system/io/file.cs,4a0905e7dc32d77d) it seems that File.Copy calls Win32Native.CopyFile function. To be honest I don't know exactly what it does, I mean I never saw the code, but I guess there's no magic and it reads the bytes from the remote computer and writes to the other remote computer.
Edit
One alternative is to login into the remote server via powershell (you can invoke ps scripts via C#) and execute the command to copy to the 2nd machine.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a 10 GB folder(myfolder) that has lot of files used in an web application. Every week, this gets recreated in a different folder(mynewfolder). I want to move old files to a diff directory and move newly created ones to the right folder without user noticing (or very less down time). I can either do it in C# program or a batch file. Which is a better option? How can I do it in batch file?
C:\myfiles\myfolder --Existing
C:\myfiles\mynewfolder -- newly created
Thanks
MR
Huh? Just rename myfolder as mynewfolder. It doesn't take any time at all regardless of how much data or how many files are in there.
rename myfolder mynewfolder
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I made a program that saves information on .dat files.
On each time the program is closed the old information is replaced by the new information.
When I open the program, it reads the information from the dat files.
I want to create a server that I will be able to upload the .dat files to it and on each Form_Close the old information will be deleted from the sever and the new information will be uploaded to the server.
When I open the program, I want it to delete the .dat files on the computer and replace them by the information from the server.
What is the best choise of service for that kind of problem ?
I thought maybe I should use Google Drive.
But I don't know if it's a good choise.
Thanks for helping.
You have tons of options here, which one is better depends on your project and goals, but all of them will work.
You can use cloud drives, like google drive, dropbox, amazon s3 and so on.
And there is 2 ways to use them.
Just File.Copy your file to the local folder and let cloud client deal with it.
Use cloud drive's API to upload file
You can buy an ftp/http hosting, or set up one of your own and upload files with c# FtpClient or HttpClient.
You can use WebDAV
You can copy your file to shared folder on the server.
You can write your own simple socket/http/ftp server. (with c# HttpListener for example)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I would like to implement a file download control for my asp.net c# MVC 4 web application. The requirements are as such
1) Only Logged in user can download the file (pdf etc.)
2) Each User can only download the file once
3) downloaded file should not be able to redistribute to others (this is what puzzled me the most)
For 1) and 2), I think these can be achieved by having records storing access information in database table.
However, I can't think of ways to achieve part 3) unless there is a way to limit the file content to query from server whenever it is opened.
Please share your idea and learn together. Cheers and thanks ~~
As you said 1 and 2 is trivial since you can track it on the server.
Number 3 will be for you probably impossible to solve. Amazon, Apple and other big companies which need to protect copy rights of eBooks or MP3, they offer to download, handle this with Digital Right Management Systems (DRM). However setting up such a system yourself, while possible, will be for sure not worth the effort.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In my folder having many photos. I want to create photo comment. its like orkut. How to manage the commented data without db as per image.
You can use XML for storing comments. Why not use DB? Managing XML files for large number of photos will be pain. You can try out SQLIte which is compact and will serve your purpose.
Check out SQLite. Its a lightweight database that lives in a single file, so you dont have to set up a database server, but you get to leverage all of the sql libraries out there and quickly build up your system.
I would put the comment into the vb++ image metadata processor and store the comment in binary format with the encryption in side the image with the comment. You could even put the link to the image in the metadata for the image so you can find the image from the metadata.