Title:The company uses a WDS server to distribute the installation system. Recently the company has updated the system requirements, the last colleague because the time is too long to remember how the WIM backup file was made. So ask but not the fruit.The task of making a WIM is given to me.1. System: WIN7_32-bit Enterprise Edition SP1. After installation, install a variety of software, thin body, and so on
To back up the database:pg_dump-h localhost-u root demo02 >/home/arno/dumps/demo02.bakTo recover a database:psql-h localhost-u root-d Demo Backup table:pg_dump-h localhost-u root demo02-t books >/home/arno/dumps/books.bakRecovery table:psql-h localhost-u root-d demo-t Books Psql Copy to/from usage:1. Need to log in to the database using Postgres Super User psql-u postgres-d demo022. Saved/Read folders need to give Postgres user permission to read and
The examples in this article describe how python implements configuration file backups. Share to everyone for your reference. Specific as follows:
Here the platform for Linux:
#!/usr/bin/python#author:gdlinjianying@qq.comimport osimport timesource = ['/etc/sysconfig/network-scripts ', '/etc/ Sysconfig/network ', '/etc/resolv.conf ']target_dir = '/opt/' target = target_dir + time.strftime ('%y%m%d%h%m%s ' + '). tar.gz ') Tar_command = "Tar-czvf '%
Backing up the SQL Server database
The code is as follows
Copy Code
Backup database [db] to disk= ' c:mysql ' + replace (replace (varchar, GETDATE (), 121), '-', ', ', '), ': ', ', ', ', ', ', '. Bak ' with Password = ' 123 ', init;
Restore the SQL Server database
code is as follows
copy code
restore DB [Database] from disk= database backup
The requirements for log backups are described below:To add a scheduled task to a Shiyanlou userPack/var/log dpkg.log,mysql.log,fontconfig.log three files to/home/shiyanlou/backup/directory every day 2 o'clock in the morningThe name format is year-month-day. Tar, for example today is October 23, 2017, then the file name is 2017-10-23.tar, and if there is a duplicate, overwrite
The first stepI searched th
Simple server file backup method compressed file name automatically named by date
Dim Filename,wshshell,fs,mycommandfilename=cstr (Now) + ". RAR "
mycommand= "rar A" +filename+ "file name or directory name to compress"
Set WshShell = WScript.CreateObject ("Wscript.Shell")
Set fs=createobject ("Scripting.FileSystemObjec
Generally, MySql database backup can be performed in two ways: Exporting SQL statements directly or SQL storage files in other formats that are easy to import, using SQL statements or some visual clients to export data, this method is very simple and does not need to be repeated. Another method is to copy the database file and convert the database file into an SQ
RSync for file backup Synchronization
1. rsync Introduction
Rsync is an application software in Unix. It can synchronously update files and directories of two computers and use differential encoding to reduce data transmission. An important feature in rsync that is not seen in most similar programs or protocols is that the image only needs to be sent once for each target. Rsync can copy/display directory at
This is a backup of all the tables in the specified database to a SQL file that can be downloaded. The source code from the DEDECMS program, a lot of functions, but also very practical, but the quality of the codes need to be improved
/****** backing up the database structure ******/
/*
function Name: Table2sql ()
function function: Convert the structure
3. File backup and compression commands:(1) bzip2 command: Used to compress files. bzip2 file name, suffix bz2. Unzip to: BUNZIP2 file name. bz2(2) Gzip command: Use gzip to compress files. gzip file name, and the suffix is gz. Unzip to: Gunzip
Oracle 11g backup file imported 10g, *. dmp file imported to 10g encountered a lot of problems
The following error occurs when I export data from 11 GB and then import the data to 10 Gb.
IMP-00010: the exported file is not valid and the header verification fails.
IMP-00000: Import failed
Use a tool to open the dmp
The method is simple. You only need a few words to set the password. For more information, see.
The method is simple. You only need a few words to set the password. For more information, see.
Back up SqlServer
The Code is as follows:
Backup Database [Database] To disk = 'C: '+ replace (CONVERT (varchar, getdate (), 121 ),'-',''), '',''),':',''),'. ', '') + '. bak 'With Password = '000000', init;
Restore an SQL Serve
When you use WPS 2012 to edit a document, if you encounter a sudden power outage, and other special circumstances, the software will prompt us to call the last time before the failure to automatically save the document to recover the loss. Although this feature is very intimate, but every once in a while WPS 2012 will automatically save the document, a long time will generate a lot of useless backup files.
These documents are stored in the C:document
Download the cwRsync server and client software as follows:
Server: cwRsync_Server_2.0.10_Installer
Client: cwRsync_2.0.10_Installer
Then I installed the server (10.0.2.136) on the local machine, and then installed the client on another machine (10.0.2.20.) in the same network segment. For testing, I put the dnt site file of our product on the drive F on the local machine, at the same time, you are ready to use the aspx and config folders in the site
, as shown in the window, prompting the user to choose whether it is a new or an old computer. If a user wants to back up the files of their current computer provider, just choose "This is my old computer", but instead if it is a newly installed operating system and want to revert to the previous setup, click "This is my new computer" and then automatically skip to the next step.
▲ Transfer of File selection
A window that prompts the use
, prompting the user to choose whether it is a new or an old computer. If a user wants to back up the files of their current computer provider, just choose "This is my old computer", but instead if it is a newly installed operating system and want to revert to the previous setup, click "This is my new computer" and then automatically skip to the next step.
▲ Transfer of File selection
A window that prompts the user to transfer the
. There is an authorized SQL code
If exists (select * from sysobjects where type = 'p' and) begin
Drop procedure sp_export_posm_data;
End;
Go
Create procedure sp_export_posm_data
@ File_path varchar (200)/* path of the exported file */
As
Declare @ exec_ SQL varchar (1000 );
Declare @ file_name varchar (200);/* file name, time format, mainly used to record when data is exported */
Declare @ table_name varch
1. tar + openssl file encryption:
There is a folder named test in the current directory:
1. Use tar to encrypt the file:
# Tar-zcvf-pma | openssl des3-Salt-K password | dd of = test. des3
After the installation is complete, a package file named test. des3 is generated. Replace the password with your password.
2. decompress the encrypted
Use Python for file backup1. The server needs to be backed up
Because of business needs, there is a Windows Server 2008 Server. The above files need to be backed up, but the windows cmd command is not well written. I started to write a cmd script with my head and found that I had been searching for time processing for half a day. It is really too difficult to use.2. Use python to solve the problem
Install Python directly on Windows and run the schedul
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.