backup
Hiển thị các bài đăng có nhãn backup. Hiển thị tất cả bài đăng

POWERSHELL SCRIPT TO AUTOMATE BACKUP OF A FILE AND APPEND THE DATE WITH SUFFIX

PowerShell script is to automate the process of copying a file  from a source directory to a destination directory

Purpose of the Script 

The purpose of this PowerShell script is to automate the process of copying a file (abc.xlsx) from a source directory to a destination directory, ensuring that: 

  1.  The source file exists before attempting any further actions. 
  2. The destination directory exists or is created if it doesn't. 
  3. No overwriting of existing files occurs in the destination directory. If a file with the same name already exists, the script appends a numeric counter (-1, -2, etc.) to the filename to ensure that each copied file has a unique name. 
  4. Safe file operations are ensured by checking for file existence and automatically generating a unique file name when necessary. 

Main Use Case:

 This script is useful when automating tasks like backing up files, copying reports, logs, or other documents, where the filenames may need to be adjusted based on the date or incremented to avoid conflicts with existing files. 

It ensures that the latest copy of the file is always transferred to the destination directory without any risk of overwriting existing files. 

 In summary, this script is designed to automate the process of file copying, making it safe, efficient, and organized, especially in environments where files with the same name (but potentially different versions) need to be handled daily or periodically.

backupfile.ps1

Một số lưu ý về backup dữ liệu

 Quy tắc backup 3-2-1 là gì?

  • Giữ ít nhất ba (3) bản sao dữ liệu.
  • Lưu trữ hai (2) bản sao lưu trên các phương tiện lưu trữ khác nhau.
  • Lưu trữ một (1) bản sao lưu ngoại vi (tape, cloud…)
Quy tắc sao lưu 3-2-1 đề cập đến cách tiếp cận đã được thử nghiệm và kiểm chứng để lưu giữ và lưu trữ dữ liệu hiệu quả, an toàn hơn

Bằng cách áp dụng quy tắc này, bạn sẽ được đảm bảo rằng dữ liệu có thể được phục hồi trong hầu hết mọi trường hợp hỏng hóc. Một trong những phương pháp phổ biến nhất là giữ một bản sao dữ liệu sản xuất, một bản sao lưu trên kho lưu trữ cục bộ và một bản sao lưu trong bộ nhớ ngoại vi hoặc trên đám mây.


Phục hồi sau thảm họa (Disaster Recovery)

Veeam Backup & Replication

 Veeam Backup & Replication sẽ bao gồm các thành phần sau:

Add Veeam Backup Proxy Windows to our Veeam Backup & Replication infrastructure